Button checked clause

[[window_id.]group_id.]button_id->checked = TRUE | FALSE

This clause allows the current state of a button to be changed at run time. The initial state in which the button is created is not affected. Use the style flag WS_CHECKED to change the initial state of a button. The clause may also be used to retrieve a button’s current state.

Changing a button’s state from checked to unchecked, or vice versa, causes the EV_BUTTON_UP or EV_BUTTON_DOWN function to be called, if one has been assigned to the button. See Button events and functions.

Note that the form button_id->checked = TRUE has the effect of holding a push button down in the selected state.

Multi buttons with a linked field may also have their state changed at run time by assigning the checked or unchecked value to the field, and displaying the button with the display command. The default unchecked value is zero, and the default checked value non-zero. Other values may be specified by means of the checked_value and unchecked value clauses. See Button linked field.


RELATED TOPICS

Buttons

Button state