Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- TSDWIN: Clipper 5.0 Interface Library - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

 twArPick( aArray, cHeader, nTop, nLeft, wColor, wSType,;
           wFType, wFColor, nRestrict, nTag, lSound )
 ----------------------------------------------------------------------------
     Displays a pick list on an array. Allows multiple (tagging) or
     single choices. The box is centered on the screen by default, or
     you can define where it goes. If the size is out of bounds, the
     box is truncated.

     Scrollbars are automatically added.

     The TBrowse processes the following keys:

                Up Arrow       -+
                Down Arrow      |
                Page Down       |- Scroll the Highlight Bar in
                Page Up         |  the normal way.
                Ctrl Page Down  |
                Ctrl Page Up   -+
                Space          - Tag one.
                F7             - Tag all.
                F8             - Untag all.
                F9             - Swap tagged/untagged.
                Home           - Same as Page Down.
                End            - Same as Page Up.
                Back Space     - Blank the search string.
                Escape         - Exit with no choice.
                Enter          - Exit with choice.
                Alt U          - Move box up one space.
                Alt N          - Move box down one space.
                Alt H          - Move box left one space.
                Alt J          - Move box right one space.
                Alpha Keys     - Speed Search with display of key.

       Arguments:

     aArray     - 'A' Passed array to process.

     cHeader    - 'C' Header for display column. Defaults to 'Select'.

     nTop       - 'N' Defaults to row 4. Shadows are taken into account
                     by the function. If the box is smaller than the
                     display, it is centered.

     nLeft      - 'N' Defaults to center the box.

     wColor     - 'C or A' Defaults to SETCOLOR(). There are six colours
                          which may be passed in an array by the user:
                          window, title, scrollbar, highlight bar,
                          unavailable and already selected. For the
                          default, they are derived from SETCOLOR() as
                          follows:

                     wColor =  Window Colour Clipper Standard
                     tColor =  Title Colour Reverse Standard Colour
                     sColor =  ScrollBar Colour Clipper Standard
                     hColor =  Hilite Bar Colour Clipper Enhanced
                     xColor =  Unavailable Colour Clipper UnSelected
                     oColor =  Item Selected Colour Reverse Standard
                     Color


     wSType   - 'N' Window shadow type. (See Quick Reference)

     wFType   - 'N' Window frame type. (See Quick Reference)

     nRestrict - 'N' Number of array elements from the top element
                     to display.

     nTag      - 'N' numeric indicating the status of tagging:
                         0 - no tagging
                         1 - use TSDWIN default
                         2 - Pretagged array

     lSound    - 'L' Logical to allow a tone at HitBottom and HitTop.

       Return:

     Defaults to current element, but is user definable.  The passed
     array must be processed for tags if tagging is allowed. (See Demo
     Source)

       Example:

     MaCode := {}
     pColor := {"w+/b","gr+/r","n/w","gr+/r","w/b","w/n"}
     Ret_Val := 0

     // Fill Array
     USE windemo INDEX windemo.ntx ALIAS codes NEW
     DBEVAL({|| AADD( MaCode, ;
                 codes->codekey+ "|" + codes->codeShort: )})

     // Call Function
     Ret_Val:=twARPick( MaCode, "Code",  ;
                   5, 10, pColor, 3, 6, LEN( MaCode ), .T. )

     IF LASTKEY == K_ESC
         QUIT
     ENDIF

     CLS
     x := 0; r := 0; c := 0
     // Process Return
     FOR x = 1 TO LEN( MaCode )
         IF "." $ MaCode[x]
             @ r,c  SAY SUBSTR( MaCode[x], 1, ;
                          LEN( MaCode[x] ) - 1 )
             r++
          ENDIF
      NEXT

See Also: twdBPick() twACChoice()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson