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

Syntax

     V_MENU( nChoice, aArray1, aArray2, abUdfs, ;
             [, cHeader[, nTr[, nTc[, nMsg_row  ;
             [, lMsg_box[, lMsg_centr[, nWidth ;
             [, nColour ]]]]]]]])

Purpose

Generalised vertical menu which can execute functions.

Arguments

     nChoice -- default choice

     aArray1 -- array of prompts for menu

     aArray2 -- array of messages

     abUdfs -- array of udfs to macro-expand or code blocks to execute

     cHeader -- menu header; defaults to "Select a Command"

     nTr -- top row of menu; defaults to 5

     nTc -- left-most menu column, defaults to centre the menu

     nMsg_row -- message display row, default MAXROW()

     lMsg_box -- draw a box around messages: default .T.

     lMsg_centr -- center messages?; default .T.

     nWidth -- menu width; defaults to longest array element or headline

     nColour -- if passed, colour to use, else AACLR_VMENU

Setup

At a minimum, nChoice and aArray1 must be passed.

Example

     LOCAL menus := { "Negotiate peacefully", ;
                      "Obfuscate royally", ;
                      "Annihilate mercilessly" ;
                    }, ;
           udfs  := { 'POP_MSG( "Negotiate peacefully" )', ;
                      'POP_MSG( "Obfuscate royally" )', ;
                      { || POP_MSG( "Annihilate mercilessly" ) } ;
                    }

     ? V_MENU( 1, menus, NIL, udfs )      && Returns 0

Returns

The number of the selected item. If abUdfs is passed, V_MENU() enters a
loop from which the only exit is ESC.

Side Effects

Those of any udf executed.

Artful Calls

DRAW_BOX, CENTRE, MIDDLE, LONGEST, SYSCOLOR

Source File

AA_VMENU.PRG

See Also: L_MENU() PD_MENU() DO_IT() H_MENU() PULL_OPEN()

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