FLOATMENU
PLBCMP GUI Only
The FLOATMENU instruction defines an object variable for a floating menu. Use FLOATMENU to define a popup menu that appears when the user clicks a control with the right mouse button. To define a FLOATMENU, 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 FLOATMENU differs from a MENU in that the FLOATMENU may be displayed anywhere on the screen, whereas a MENU is always displayed in the menu bar.
A FLOATMENU contains as many items as there are lines in the menu. Each menu line is one item.
The entire FLOATMENU is referenced as item number zero.
Items are accessible through the SETITEM or GETITEM instructions.
FLOATMENUs 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 FLOATMENU 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 a Pointer Variable.
Although a FLOATMENU 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
![]() |