SUBMENU
PLBCMP GUI Only
The SUBMENU instruction defines an object variable for a menu attached to an item in another menu. To define a SUBMENU, use one of the following statement formats:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Data Label.
%
Optional. Denotes the item as being GLOBAL.
arraysize
Required. An integer decimal constant, CONST variable, or EQUATEd value indicating the number of array items.
^
Optional. Denotes the item as being a POINTER.
target
Required. The name of a previously defined data item of the same type.
Flags Affected: NONE
Note the following:
A SUBMENU contains as many items as there are lines in the submenu. Each submenu line is one item.
The entire SUBMENU is referenced as item number zero.
Items are accessible through the SETITEM or GETITEM instructions.
SUBMENUs support an ITEMS collection. The internal composition of these objects is multiple MENUITEM objects. The ITEMS collection allows direct access to the MENUITEM objects by the GETPROP or SETPROP statements. The collection uses the following format:
Where:
label
Optional. A program execution label.
object
Required. A SUBMENU object that is accessed.
key
Required. A Character String Variable or Numeric Variable that specifies the run-time name (RUNNAME property) or zero-based position of the menu item.
property
Required. The remaining line of the GETPROP statement.
Multi-dimension arrays are supported up to a maximum of fourteen dimensions.
The ^ denotes Pointer Variable.
Although a SUBMENU may be defined as Global, it is DESTROYed during a CHAIN instruction.
The CHECKITEM instruction allows a check mark to appear with a menu item.
See Also: Example Code, Object Definitions, Object Output Instructions
![]() |