BUTTON
PLBCMP GUI Onlyy
The BUTTON instruction defines an object variable for a push button. Users click BUTTON objects to begin, interrupt, or end a process. When chosen, a BUTTON appears pushed in and so is sometimes called a push button. The BUTTON face may contain text or an image. To define a BUTTON, 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 BUTTON contains only one item accessible through SETITEM. It is the push button.
The BUTTON is always referenced as item number zero for SETITEM and GETITEM instructions.
The text displayed on a BUTTON is specified when the button is CREATEd. Subsequently, it may be modified or retrieved using the SETITEM and GETITEM instructions. If a Null String is specified, no text is displayed on the BUTTON.
The text associated with a BUTTON may include an Alt Keyboard Sequence.
An icon or picture may be displayed on a BUTTON in place of the text. To add an icon to a BUTTON, use the ICON property. Pictures are added using the PICTURE property. Any text associated with the BUTTON is still available and any Alt Keyboard Sequence defined is still active.
To allow the user to choose a BUTTON by pressing the enter key, set the DEFAULT property to $ON. Only one button per window may be designated as the DEFAULT button.
To allow the user to choose a BUTTON by pressing the escape key, set the CANCEL property to $ON. Only one button per window may be designated as the CANCEL button.
Multi-dimension arrays of BUTTONS are supported up to a maximum of fourteen dimensions.
The ^ denotes a Pointer Variable to a BUTTON object.
Although a BUTTON may be defined as Global, it is DESTROYed during a CHAIN instruction.
See Also: Example Code, Object Definitions, Object Output Instructions
![]() |