MENU
PLBCMP GUI Only
The MENU instruction defines an object variable for a standard GUI drop-down menu in the main window menu bar. MENUs allow users a method of initiating processes. To define a MENU, 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 MENU contains as many items as there are lines in the menu. Each menu line is one item.
The entire MENU is referenced as item number zero.
Items are accessible through the SETITEM or GETITEM instructions.
MENUs 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 MENU object that is accessed.
key
Required. A Character String Variable, Numeric Variable, or Expression 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 MENU 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
![]() |