None of the properties is required; you can determine the user's
selection by setting any of the three following properties: accelerators, labelText,
or labelKey.
The following common properties are available for menu items; run
time accessibility varies:
Table 1. Properties that apply to menu item variables| Property |
Description |
| help |
Specifies the help text that is displayed when
the user selects the menu item and presses the key identified in consoleLib.key_help.
Can be changed at run time. |
| labelKey |
The name of a field containing a key for searching
the resource bundle that contains the label for the menu item. Cannot
be changed at run time. |
| labelText |
STRING literal identifying a label for a menu
item. Cannot be changed at run time. |
The following properties are unique to menu items or have special
meaning in this context:
- accelerators
- Indicates keystrokes with an openUI statement
that are equivalent to the user's selection of the menu item. Each
of those keystrokes causes EGL to run the OnEvent clause
that corresponds to the menu item selection.
- Type: String[]
- Example: accelerators = ["F1", "ALT_F1"]
- Default: none
- Updatable at run time? No
- comment
- Specifies text displayed in the comment line specific to the menu
item when the menu item is selected.
- Type: String
- Example: "Delete the record"
- Default: Empty string
- Updatable at run time? Yes
The comment line is located immediately below the menu line.
- commentKey
- Specifies a key used to search the resource bundle that includes
the text displayed in the menu item-specific comment line (if any)
when the menu item is selected. If you specify both comment and commentKey, comment is
used.
- Type: String
- Example: commentKey = "myKey"
- Default: Empty string
- Updatable at run time? Yes
The resource bundle is identified by the consoleLib.messageResource system
variable; see messageResource (EGL system variable).
- labelText
- The label that represents the menu item.
- Type: String literal
- Example: labelText = "Delete".
- Default: none.
- Updatable at run time? No
- labelKey
- Specifies a key for searching the resource bundle that contains
the menu item label. If you specify both labelText and labelKey, labelText is
used.
- Type: String
- Example: labelKey = "myKey"
- Default: Empty string
- Updatable at run time? No
The resource bundle is identified by the consoleLib.messageResource system
variable, as described in "messageResource (EGL system variable)."
- name
- A name for the menu item that is resolved at run time. In particular,
the name is used in the openUI statement
that responds to the menu item selection.
If you use the name property,
give it the same value as the name of the variable.
- Type: String
- Example: name = "myItem"
- Default: none
- Updatable at run time? No