Difference between revisions of "ON MENU"
Yvonnemilne (Talk | contribs) |
Helengeorge (Talk | contribs) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Purpose== | ==Purpose== | ||
Execute a command when a menu pad is highlighted | Execute a command when a menu pad is highlighted | ||
Line 15: | Line 8: | ||
==See Also== | ==See Also== | ||
− | [[ACTIVATE MENU]], [[DEFINE MENU]], [[DEFINE PAD]], [[ON BAR]], [[ON EXIT BAR]], [[ON EXIT MENU]], [[ON EXIT PAD]], [[ON PAD]], [[ON SELECTION MENU]], [[ON SELECTION PAD]], [[ | + | [[ACTIVATE MENU]], [[DEFINE MENU]], [[DEFINE PAD]], [[ON BAR]], [[ON EXIT BAR]], [[ON EXIT MENU]], [[ON EXIT PAD]], [[ON PAD]], [[ON SELECTION MENU]], [[ON SELECTION PAD]], [[PAD()]], [[SET COMPATIBLE]] |
Line 28: | Line 21: | ||
define menu main | define menu main | ||
define pad exit of main; | define pad exit of main; | ||
− | prompt "<Exit" at 0,0 | + | prompt "\<Exit" at 0,0 |
define pad filelist of main; | define pad filelist of main; | ||
− | prompt "<Files" at 0,6 | + | prompt "\<Files" at 0,6 |
on menu main dialog box "On Menu" | on menu main dialog box "On Menu" | ||
Line 39: | Line 32: | ||
==Products== | ==Products== | ||
− | Recital | + | Recital |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Commands]] | [[Category:Commands]] | ||
+ | [[Category:Menus]] | ||
+ | [[Category:Menus Commands]] |
Latest revision as of 15:46, 12 November 2009
Purpose
Execute a command when a menu pad is highlighted
Syntax
ON MENU <menu name> [<command>]
See Also
ACTIVATE MENU, DEFINE MENU, DEFINE PAD, ON BAR, ON EXIT BAR, ON EXIT MENU, ON EXIT PAD, ON PAD, ON SELECTION MENU, ON SELECTION PAD, PAD(), SET COMPATIBLE
Description
The ON MENU command is used to specify commands which will execute when menu pads that do not have an ON PAD command associated with them are highlighted. A pad is a menu option in an Xbase style menu. These types of menus are created with the DEFINE MENU and DEFINE PAD commands. The menu is identified by the name <menu name> that was assigned with the DEFINE MENU command. The command SET COMPATIBLE should be ON when using Xbase style menus.
The specified command, <command>, may be any Recital/4GL command. To specify a command that will execute when an individual pad is selected, see the ON SELECTION PAD command. To specify a command to execute when an individual pad is highlighted, use the ON PAD command. Used without a specified command, the ON MENU command disables previously specified commands. Commands specified by an ON PAD command override commands specified by the ON MENU command.
Example
define menu main define pad exit of main; prompt "\<Exit" at 0,0 define pad filelist of main; prompt "\<Files" at 0,6 on menu main dialog box "On Menu" on exit menu main dialog box "On Exit Menu" activate menu main
Products
Recital