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 - <b>; browsearray <array> at [<top>], [<left>], [<bottom>], [<right>] ; </b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
; BROWSEARRAY <array> AT [<top>], [<left>], [<bottom>], [<right>] ; 
       [TITLE <title>] [HEADERS <headers>] [FOOTERS <footers>] ;
       [EDIT <edit>] [ACTIONKEYS <actionkeys>] [COLOR <color>] ;
       [SHADOW <shadow>] [FRAME <frame>] [FRAMECOLOR <framecolor>]
       ; [AUTOLITE <autolite>] [FREEZE <freeze>] ;
 ----------------------------------------------------------------------------

Purpose: 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.

         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.

Parameters: array        - 'A' Passed Array .

            top, left    - 'N' Screen coordinates for the display
            bottom, right      window.


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

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

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

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

            actionkeys   - '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.


            color     - '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.

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

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

            framecolor - '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.

            autolite    - '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.


Example: BROWSEARRAY tArray AT wT, wL, wB, wR ;
            TITLE "Header File Test" ;
            HEADERS  {"File Name", ;
                         "Size","Date","Time","Attribute"} ;
            SHADOW 1 FRAME 9 FRAMECOLOR "gr+/r" ;
            AUTOLITE .T. FREEZE 1

See Also: twArBrowse()

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