RADIO
PLBCMP GUI Only
The RADIO instruction defines an object variable for a standard GUI radio button. A radio set may be created by assigning the same GROUPID to a group of radio buttons. For a radio set, the RADIO buttons present a set of mutually exclusive options to the user; that is, only one radio button in the set may be selected at any time. When the user selects a radio button, the previously selected button becomes unselected. Radio buttons are frequently grouped using a GROUPBOX object. To define a RADIO 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 RADIO contains only one item that is the text that is displayed beside the radio button.
The RADIO is always referenced as item number zero.
The item is accessible through the SETITEM or GETITEM instructions.
A radio button is considered set if the value of the object is one and clear if the value is zero.
The runtime will only perform the default action of changing the state of an individual RADIO if there is no user code associated with the object during activation. If a RADIO is a member of a radio set, the runtime performs the state change action if the $GOTFOCUS event is not registered using the EVENTREGISTER instruction.
Multi-dimension arrays are supported up to a maximum of fourteen dimensions.
The ^ denotes Pointer Variable.
Although a RADIO may be defined as Global, it is DESTROYed during a CHAIN instruction.
The SETMODE *SUBTABFORENTER control alters the ENTER key behavior of a RADIO.
See Also: Example Code, Object Definitions, Object Output Instructions
![]() |