[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
+---------------------------------+
|               PAD               |
+---------------------------------+
PAD()

-----------------------------------
Returns name of menu pad that was last chosen from menu bar.
Return value - Character
-----------------------------------

The PAD() function returns, as a character string, the name of the PAD
that was last chosen from an active menu bar.

A menu must be defined and active for the PAD function to return a PAD
name.  Menus are defined and activated with the DEFINE MENU and ACTIVATE
MENU commands.  If a menu is not active or PAD() is issued from the
Command window, PAD() returns the null string.

+---------------------------------+
|         Program Example         |
+---------------------------------+
A menu bar is defined containing four menu pads.  When one of pads is
chosen, ON SELECTION MENU passes two values to TMENU.  These values are
provided by MENU() and PAD().  TMENU displays menu bar name MENU(), and
menu pad name PAD().

CLEAR
DEFINE MENU mainmenu
DEFINE PAD invoices  OF mainmenu PROMPT ' \<INVOICES '  AT 0,0
DEFINE PAD customers OF mainmenu PROMPT ' \<CUSTOMERS ' AT 0,20
DEFINE PAD inventory OF mainmenu PROMPT ' I\<NVENTORY ' AT 0,40
DEFINE PAD quit      OF mainmenu PROMPT ' \<QUIT '      AT 0,60

ON SELECTION MENU mainmenu ;
        DO tmenu WITH MENU(), PAD()
ACTIVATE MENU mainmenu

PROCEDURE tmenu
PARAMETER mmenu, mpad
WAIT WINDOW 'Selected menu pad of ' + mmenu + ' is ' + mpad NOWAIT
IF mpad= 'QUIT'
        DEACTIVATE MENU
ENDIF
RETURN

-----------------------------------

See Also:  ACTIVATE MENU, BAR(), DEFINE PAD, DEFINE MENU, MENU(), ON
PAD, ON SELECTION PAD, PROMPT()

-----------------------------------

See Also: ACTIVATE MENU BAR() DEFINE PAD DEFINE MENU MENU() ON
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson