button_state(PANEL*,var num,var state)
Changes or returns the button state of a panel.
Parameters:
PANEL*
Panel pointer.
num
The number of the button, starting with 1.
state
The new state of a radio or toggle button,
ON
(
1
) or
OFF
(
0
).
-1
leaves the button state unchanged.
Returns:
The state of the radio or toggle button,
ON
(
1
) or
OFF
(
0
).
Remarks:
The number counts all button elements - push, radio, and toggle buttons. For reading the button state, use a state parameter of
-1
.
Example:
button_state(my_panel,1,ON);
See also:
PANEL
,
button
,
pan_setbutton
► latest version online