Sets the contents of the pop-up menu and associated pull-down menu items in the Editor window.
| Note: | This parameter is only valid when issued in an Editor window. |
Scope: File
Syntax
set popupmenu.{Item|BITMAP_resdll_id}[.{Subitem|BITMAP_resdll_id}]
[...] [OrdinalNumber] [Command]
query popupmenu.{Item|BITMAP_resdll_id}[.{Subitem|BITMAP_resdll_id }][...]
Options
Item |
Name of the menu item to be included on the pop-up menu. | ||||
Subitem |
Name of the selection item to be added to the Item pull-down menu. | ||||
BITMAP |
Specifies that the pop-up or pull-down
menu item is a bitmap. If this is chosen, you must also
specify:
|
||||
OrdinalNumber |
The position at which the menu item is inserted, starting at zero. Separators are included in the count. | ||||
Command |
The action or actions to perform when Subitem is selected. |
Description
The popupmenu parameter is used to add menu choices to the Editor window pop-up menu and its associated pull-down menus. You can create completely new pull-down menu sets, or you can add to the contents of existing pull-down menus.
Use text or icons to represent menu choices.
If Item, Subitem, or BITMAP is not an existing item, it is created.
If Item, Subitem, or BITMAP is an existing item, the following happens:
If a command is specified, the previous command is replaced with the newly-specified command.
If an item contains a pull-down or cascaded menu, you cannot change the contents of that item to a command. Similarly, if an item contains a command, you cannot change the contents of that item to a pull-down or cascaded menu. You must first delete the item, then recreate it specifying the new menu item contents.
If no command is specified, the item and any commands or sub- menu items attached to it are deleted.
Examples
set popupmenu.Example alarm
set popupmenu.E~xample.~Sound alarm
The mnemonic for Example is x, and the mnemonic for Sound is s.
Note: You cannot define menu items with the same name within a given menu set. Though Examples 1 and 2 appear to set up menu-bar items with the same base name, the mnemonic differentiates them. You could continue to set up more menu-bar items with the same base name as long as a different mnemonic was used for each item.
set popupmenu.E~xample.~Sound\tAlt+S alarm
The accelerator for Sound is Alt+S.
set popupmenu.E~xample.BITMAP_evfwrc21_2 alarm
You can also use a bitmap as a menu item in the pop-up menu.
set popupmenu.E~xample.~Add.One_line add 1 set popupmenu.E~xample.~Add.Two_lines add 2 set popupmenu.E~xample.~Add.Three_lines add 3
API Return Code
-1 |
The option specified for Item was
not valid. Type the option exactly as it appears in the
menu, including uppercase and lowercase letters. |
-2 |
The item, sub-menu item, or bitmap name contains invalid characters, or you tried to define a new menu item without specifying a command. |
![]()
popupinit Parameter
popuplink Parameter
popupmenuid Parameter
popupmenulist Parameter
