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]

 twMenuTo( bVarblock, cVarName, aMenu )
 ----------------------------------------------------------------------------

     twMenuTo() can replace MENU TO or __MENUTO() from Clipper. It has
     superior keystroke handling, has mouse support, has definable
     colour definitions and a superior 'MESSAGE' system. It also makes
     provision for choice exclusions, much the same as used when
     passing an array of logicals to twACChoice(). twMenuTo() behaves
     in accordance with the environment set up for it in twMenuInit()
     and bases  the selection process on the information provided by
     the associated function TSDWIN internal twAtPrompt().

     The default environment is:

                     Menu Color: SETCOLOR()
                 Message System: Same as  Clipper.
        Retain Prompt HighLight: Off

     Other possible environments are described in twMenuInit().

     NOTE: Although it is possible to operate twMenuTo() with action
           code blocks defined in TSDWIN internal twAtPrompt(), it must
           be noted that recursion IS NOT POSSIBLE when you use them.
           If you use action blocks, DO NOT call another twMenuTo()
           from within them. Action blocks are for self-contained menus
           only.

       Mouse Support:

     When in a menu, the mouse is confined to the window in which the
     menu resides. Consequently, there are no hot spot function to
     operate outside the menu as there are in other TSDWIN functions
     for making  selections. Should you wish to define a selection
     process with hot spots, you are encouraged to use twRABrowse(),
     twACChoice() or, if selecting from a file, twBRBrowse().

     When a menu is under way, the highlight bar follows the mouse
     cursor. When navigation keys are used, the mouse cursor follows
     the highlight bar. The menu navigation keys are the same as for
     Clipper's MENU TO.

     The mouse button actions are:

         Left Button: Select highlighted item.
        Right Button: Exit with no choice.

       Arguments:

     bVarblock - 'B' Get/Set block for the variable assigned to the
                     menu choice.

     cVarName  - 'C' Variable name assigned  to the menu choice.

     aMenu     - 'A' Array of prompts set up for TSDWIN internal
                     twAtPrompt().

       Return:

    A numeric indicating the choice position in the prompt array or
    zero if you exit with no choice.

       Example:

     nChoice := twMenuTo( {|_1| if( PCOUNT() == 0,;
                                nChoice, nChoice := _1 )},;
                          "nChoice", aItems )

See Also: twPopMenu() twPopChoice() twACChoice()

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