SUBMENU


PLBCMP GUI Only

square.png Properties

square.png Events

square.png Methods

square.png Instructions

 

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:

 

(1)

[label]

SUBMENU

[%]

(2)

[label]

SUBMENU

(arraysize)

(3)

[label]

SUBMENU

^

(4)

[label]

SUBMENU

^,{target}

(5)

[label]

SUBMENU

^(arraysize)

(6)

[label]

SUBMENU

^(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 SUBMENU contains as many items as there are lines in the submenu. Each submenu line is one item.

  2. The entire SUBMENU is referenced as item number zero.

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

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

  5.  

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

     

    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.

     

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

  7. The ^ denotes Pointer Variable.

  8. Although a SUBMENU may be defined as Global, it is DESTROYed during a CHAIN instruction.

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

  10. SUBMENUs cannot be scaled using the WINDOW Scale method.

 

 

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



PL/B Language Reference STATUSPANEL TABCONTROL