Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Nanforum Toolkit v2.1 Reference Guide - <b>ft_menu2()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FT_MENU2()
 Vertical lightbar menu
------------------------------------------------------------------------------

 Syntax

      FT_MENU2( <aMenuarray> [, <cColors> ] ) -> NIL

 Arguments

     <aMenuarray> is an array of menu options, messages, and action
      blocks.

     Each element in this array is a nested array with the structure:

        element[x, 1] = menu option
        element[x, 2] = message to be displayed when option is highlighted
        element[x, 3] = code block to be executed when option is selected

     <cColors> is a string containing colors for the prompts, in the same
     format as that returned by Set( _SET_COLOR ).  If not supplied,
     colors default to the current color setting.

 Returns

     NIL

 Description

     This function greatly simplifies the process of displaying light-bar
     menus.  All prompts are padded out with spaces so they are the same
     length, a box is drawn around the prompts, the box is automatically
     centered on the screen, and the underlying screen is restored after
     a menu selection has been made.

     Additionally, because you can tie action blocks to each menu
     option, you can save on a lot of DO CASE or IF..ELSEIF code in your
     main program.  See the test code for a succinct demonstration.

 Examples

      LOCAL mainmenu := ;
          { { "Data Entry", "Enter data",   { || FT_MENU2(datamenu)  } }, ;
            { "Reports",    "Hard copy",    { || FT_MENU2(repmenu)   } }, ;
            { "Maintenance","Reindex files",{ || FT_MENU2(maintmenu) } }, ;
            { "Quit", "See ya later" } }
      FT_MENU2(mainmenu)

 Source: VERTMENU.PRG

 Author: Greg Lief

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