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]

 twArBrowse( wT, wL, wB, wR, aInRa , cTitle, aColHead,;
             Footers, lEditFlag, aActionKeys, wColor, ;
             wSType, wFType, wFColor, lAlite, nFreeze )
 ----------------------------------------------------------------------------
     Display and handle keystrokes for a TBrowse defined on a passed
     array. All parameters have defaults. By allowing the function to
     set them, twArBrowse() operates similarly to DBEDIT(), but with
     superior keystroke defaults. twArBrowse() DOES NOT include mouse
     support.

     The TBrowse processes the following keys:

                Up Arrow ---------+
                Down Arrow        |
                Left Arrow        |
                Right Arrow       |
                Page Down         |- Scroll the Highlight Bar in
                Page Up           |  the normal way.
                Ctrl Page Down    |
                Ctrl Page Up      |
                Ctrl Left Arrow   |
                Ctrl Right Arrow  |
                Ctrl Home         |
                Ctrl End ---------+

                Escape         - Exit with no choice.
                Enter          - If EditFlag is .T., allow editing of
                                 the current array element.
                Delete         - Delete the current element and resize
                                 the array.
                Alpha Keys     - Speed Search.
                F1             - Display default keystroke handling.
                F8             - Swap current column with the one on
                                 the left.
                F7             - Delete the current column from the
                                 display.
                F9             - Subtract one to the count of columns
                                 on the left which are frozen. The
                                 freeze value defaults to 0.
                F10            - Add one to the count of columns
                                 on the left which are frozen. The
                                 freeze value defaults to 0.

       Arguments:

     wT, wL     - 'N' Screen coordinates for the display
     wB, wR           window.

     aInRa      - 'A' Passed Array .

     cTitle     - 'C' Header for the display window. The default is
                      NIL.

     ColHead    - 'A' Optional array of headers for the columns.
                      Defaults to NIL.

     Footers    - 'A' Footer for the columns. The default is NIL.

     EditFlag   - 'L' Allow/disallow editing in the DBedit() manner.

     aActionKeys - 'A' This optional parameter allows you to require
                      twArBrowse() to execute external code WITHOUT
                      exiting the browse. The operation is similar to
                      that used in the Alert Class.

                      Each element in the array must have two elements,
                      the first to indicate which key you wish to use
                      to invoke the external code, the second, a code
                      block to execute when that key is pressed.

                      ActionKeys can be used to override the default
                      keystroke handling in twArBrowse(), ie., if you
                      don't like what K_F8 does, pass in code to
                      replace it in the ActionKeys Array or pass NIL to
                      suspend it.

     wColor     - 'C' Clipper colour string. Defaults to
                      SETCOLOR(). It is suggested that you pass
                      a colour string with the Clipper
                      background colour set. If you do, that
                      colour is used for frozen columns.

     wSType     - 'N' TSDWIN shadow type. Defaults to no shadow.

     wFType     - 'N' TSDWIN frame type. Defaults to single line box.

     wFColor    - 'C' Optional border colour. Can be used to make the
                      active window, in this case the browse, have a
                      different border colour from other windows.

     ALite      - 'L' Logical to indicate whether or not to use field
                      pointing for the highlight or to disable it and
                      highlight an entire row of the display.

     Freeze     - 'N' The number fo columns to freeze.

       Return:

     Current Element Number.

       Example:

     FUNCTION Main()
     LOCAL wT := 3, wL := 5, wB := 20, wR := 74
     LOCAL ColHead := "", ActionKeys, wColor
     LOCAL wSType := 3, wFType := 4
     LOCAL tArray :={}, f

     SETCOLOR("w+/b,gr+/r,,bg+/n,n/w")
     twOpen()

     FOR f = 1 TO 100
             AADD( tArray, "Array Element " + STR( f, 3 ) )
     NEXT

     twArBrowse( wT, wL, wB, wR, tArray )

     tArray := DIRECTORY("*.*")

     twArBrowse( wT, wL, wB, wR, tArray )

     RETURN NIL

See Also: twGetaBrowse() twABBrowse() twRABrowse()

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