The following list defines the consoleFields in a variable of type MenuItem.
None of the consoleFields is required; you can determine the user's selection
by setting any of three fields:
accelerators,
labelText, or
labelKey.
- accelerators
- Indicates keystrokes that are equivalent to the user's selection of the
menuItem. Each of those keystrokes causes execution of the openUI statement's
OnEvent clause that corresponds to the menuItem selection.
- Type: String[]
- Example: accelerators = ["F1", "ALT_F1"]
- Default: none
- Updatable at run time? No
- comment
- Specifies the comment, which is the text displayed in the menuItem-specific
comment line when the menuItem is selected.
- Type: String
- Example: "Delete the record"
- Default: Empty string
- Updatable at run time? Yes
The comment line is one beneath the menu line.
- commentKey
- Specifies a key used to search the resource bundle that includes the comment,
which is text displayed in the menuItem-specific comment line (if any) when
the menuItem 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 system variable ConsoleLib.messageResource,
as described in messageResource.
- help
- Specifies the text to display when the following situation is in effect:
- The menuItem is selected; and
- The user presses the key identified in ConsoleLib.key_help.
- Type: String
- Example: help = "Deletion is permanent"
- Default: Empty string
- Updatable at run time? Yes
- helpKey
- Specifies an access key for searching the resource bundle that contains
text for display when the following situation is in effect:
- The menuItem is selected; and
- The user presses the key identified in ConsoleLib.key_help.
If you specify both
help and
helpKey,
help is
used.
- Type: String
- Example: helpKey = "myKey"
- Default: Empty string
- Updatable at run time? Yes
The resource bundle is identified by the system variable ConsoleLib.messageResource,
as described in messageResource.
- labelText
- The label that represents the menuItem.
- 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 menuItem
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 system variable ConsoleLib.messageResource,
as described in messageResource.
- name
- MenuItem name, as used in a programming context in which the name is resolved
at run time. In particular, the name is used in the openUI statement
that responds to the menuItem selection.
It is recommended that the value
of the name field be the same as the name of the variable.
- Type: String
- Example: name = "myItem"
- Default: none
- Updatable at run time? No