[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
+---------------------------------+
| MENU |
+---------------------------------+
MENU()
-----------------------------------
Returns name of active menu bar.
Return value - Character.
-----------------------------------
The MENU() function returns, as a character string of uppercase letters,
the name of the currently active menu. If a menu is not currently
active, MENU() returns the null string.
To return the menu name, the menu must first be defined with the DEFINE
MENU command and then activated with the ACTIVATE MENU command.
+---------------------------------+
| Program Example |
+---------------------------------+
In this example, a menu bar is defined with 4 menu pads. When one of
the menu pads is chosen, two values are passed to the TMENU routine by
MENU() and PAD(). The TMENU routine displays the menu bar name supplied
by MENU() and the menu pad name provided by PAD().
CLEAR
DEFINE MENU mainmenu
DEFINE PAD invoices OF mainmenu PROMPT ' \<INVOICES ' AT 00,00
DEFINE PAD customers OF mainmenu PROMPT ' \<CUSTOMERS ' AT 00,20
DEFINE PAD inventory OF mainmenu PROMPT ' I\<NVENTORY ' AT 00,40
DEFINE PAD quit OF mainmenu PROMPT ' \<QUIT ' AT 00,60
ON SELECTION PAD invoices OF mainmenu ;
DO tmenu WITH MENU(), PAD()
ON SELECTION PAD customers OF mainmenu ;
DO tmenu WITH MENU(), PAD()
ON SELECTION PAD inventory OF mainmenu ;
DO tmenu WITH MENU(), PAD()
ON SELECTION PAD quit OF mainmenu ;
DO tmenu WITH MENU(), PAD()
ACTIVATE MENU mainmenu
PROCEDURE tmenu
PARAMETER mmenu, mpad
WAIT WINDOW 'Selected menu pad of ' + mmenu + ' is ' + mpad
WAIT
CLEAR
IF mpad= 'QUIT'
DEACTIVATE MENU
ENDIF
RETURN
-----------------------------------
See Also: ACTIVATE MENU, DEFINE MENU
-----------------------------------
See Also:
ACTIVATE MENU
DEFINE MENU
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson