FLOATMENU


PLBCMP GUI Only

square.png Properties

square.png Events

square.png Methods

square.png Instructions

 

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:

 

(1)

[label]

FLOATMENU

[%]

(2)

[label]

FLOATMENU

(arraysize)

(3)

[label]

FLOATMENU

^

(4)

[label]

FLOATMENU

^,{target}

(5)

[label]

FLOATMENU

^(arraysize)

(6)

[label]

FLOATMENU

^(arraysize),({target}),...,({target})

 

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:

  1. 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.

  2. A FLOATMENU contains as many items as there are lines in the menu. Each menu line is one item.

  3. The entire FLOATMENU is referenced as item number zero.

  4. Items are accessible through the SETITEM or GETITEM instructions.

  5. 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:

  6.  

         [label] GetProp {object}.ITEMS({key}),{property}

     

    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.

     

  7. Multi-dimension arrays are supported up to a maximum of fourteen dimensions.

  8. The ^ denotes a Pointer Variable.

  9. Although a FLOATMENU may be defined as Global it is DESTROYed during a CHAIN instruction.

  10. The CHECKITEM instruction allows a check mark to appear with a menu item.

  11. FLOATMENUs cannot be scaled using the WINDOW Scale method.

 

 

See Also: Example Code, Object Definitions, Object Output Instructions



PL/B Language Reference ERROR FONT