The PMENU Procedure |
Featured in: | Building a Menu Bar for an FSEDIT Application |
ITEM command <option(s)><action-options>; |
ITEM 'menu-item' <option(s)><action-options>; |
Task | Option | |
---|---|---|
Specify the action for the item |
|
|
|
Associate the item with a dialog box |
DIALOG= |
|
Associate the item with a menu |
MENU= |
|
Associate the item with a command |
SELECTION= |
|
Associate the item with a common submenu |
SUBMENU= |
Specify help text for an item |
HELP= |
|
Define a key that can be used instead of the menu |
ACCELERATE= |
|
Indicate that the item is not an active choice in the window |
GRAY |
|
Provide an ID number for an item |
ID= |
|
Define a single character that can select the item |
MNEMONIC= |
|
Place a check box or a radio button next to an item | STATE= |
Required Arguments |
a single word that is a valid SAS command for the window in which the menu appears. Commands that are more than one word, such as WHERE CLEAR, must be enclosed in single quotation marks. The command appears in uppercase letters on the menu bar.
If you want to control the case of a SAS command on the menu, then enclose the command in single quotation marks. The case that you use then appears on the menu.
a word or text string, enclosed in quotation marks, that describes the action that occurs when the user selects this item. A menu item should not begin with a percent sign (%).
Options |
defines a key sequence that can be used instead of selecting an item. When the user presses the key sequence, it has the same effect as selecting the item from the menu bar or menu.
Restriction: | The functionality of this option is limited to only a few characters. For details, see the SAS documentation for your operating environment. |
Restriction: | This option is not available in all operating environments. If you include this option and it is not available in your operating environment, then the option is ignored. |
is one of the following:
the name of an associated DIALOG statement, which displays a dialog box when the user selects this item.
Featured in: | Creating a Dialog Box to Search Multiple Variables |
the name of an associated MENU statement, which displays a menu when the user selects this item.
Featured in: | Building a Menu Bar for an FSEDIT Application |
the name of an associated SELECTION statement, which submits a command when the user selects this item.
Featured in: | Building a Menu Bar for an FSEDIT Application |
the name of an associated SUBMENU statement, which displays a pmenu entry when the user selects this item.
Featured in: | Building a Menu Bar for an FSEDIT Application |
If no DIALOG=, MENU=, SELECTION=, or SUBMENU= option is specified, then the command or menu-item text string is submitted as a command-line command when the user selects the item.
indicates that the item is not an active choice in this window. This option is useful when you want to define standard lists of items for many windows, but not all items are valid in all windows. When this option is set and the user selects the item, no action occurs.
specifies text that is displayed when the user displays the menu item. For example, if you use a mouse to pull down a menu, then position the mouse pointer over the item and the text is displayed.
Restriction: | This option is not available in all operating environments. If you include this option and it is not available in your operating environment, then the option is ignored. |
Tip: | The place where the text is displayed is operating environment-specific. |
a value that is used as an identifier for an item in a menu. This identifier is used within a SAS/AF application to selectively activate or deactivate items in a menu or to set the state of an item as a check box or a radio button.
Minimum: | 3001 |
Restriction: | Integers from 0 to 3000 are reserved for operating environment and SAS use. |
Restriction: | This option is not available in all operating environments. If you include this option and it is not available in your operating environment, then the option is ignored. |
Tip: | ID= is useful with the WINFO function in SAS Component Language. |
Tip: | You can use the same ID for more than one item. |
See also: | STATE= option |
underlines the first occurrence of character in the text string that appears on the menu. The character must be in the text string.
The character is typically used in combination with another key, such as ALT. When you use the key sequence, it has the same effect as putting your cursor on the item. But it does not invoke the action that the item controls.
Restriction: | This option is not available in all operating environments. If you include this option and it is not available in your operating environment, then the option is ignored. |
provides the ability to place a check box or a radio button next to an item that has been selected.
Tip: | STATE= is used with the ID= option and the WINFO function in SAS Component Language. |
Restriction: | This option is not available in all operating environments. If you include this option and it is not available in your operating environment, then the option is ignored. |
Defining Items on the Menu Bar |
You must use ITEM statements to name all the items that appear in a menu bar. You also use the ITEM statement to name the items that appear in any menus. The items that you specify in the ITEM statement can be commands that are issued when the user selects the item, or they can be descriptions of other actions that are performed by associated DIALOG, MENU, SELECTION, or SUBMENU statements.
All ITEM statements for a menu must be placed immediately after the MENU statement and before any DIALOG, SELECTION, SUBMENU, or other MENU statements. In some operating environments, you can insert SEPARATOR statements between ITEM statements to produce lines separating groups of items in a menu. See SEPARATOR Statement for more information.
Note: If you specify a menu bar that is too long for the window, then it might be truncated or wrapped to multiple lines.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.