On Bar, On Pad, On Selection Bar, On Selection Menu, On Selection Pad, On Selection Popup
These commands are the key to making your menus do something. The DEFINE commands set up the menus and the ACTIVATE commands turn them on, but without the ON and ON SELECTION commands, not much happens after that.The ON BAR and ON PAD commands let one menu component activate another component. The ON SELECTION commands are much broader—they let you specify anything at all to happen when a particular item is chosen.
Usage |
ON BAR nBar OF PopupName [ ACTIVATE POPUP SubPopupName | ACTIVATE MENU SubMenuName ] ON PAD PadName OF MenuName [ ACTIVATE POPUP PopupName | ACTIVATE MENU SubMenuName ] |
Example |
* From the system menu: ON PAD _MSM_FILE OF _MSYSMENU ACTIVATE POPUP _MFILE |
Usage |
ON SELECTION BAR nBar OF PopupName [ Command ] ON SELECTION MENU MenuName | ALL [ Command ] ON SELECTION PAD PadName OF MenuName [ Command ] ON SELECTION POPUP PopupName | ALL [ Command ] |
Example |
USE Employee DEFINE POPUP EmpPop ; PROMPT FIELDS TRIM(First_Name - (" " + Last_Name)) ON SELECTION POPUP EmpPop WAIT WINDOW "You picked "+PROMPT() |
See Also |
Activate Menu, Activate Popup, Define Bar, Define Menu, Define Pad, Define Popup, Menus |