RadioButto

RadioButtoSelect

Set or toggle the selection state of a radio button

Syntax

Signature
xBool           RadioButtoSelect( RadioButto *radioButto, int newState );

Arguments

radioButto the radio button.

newState use T to select, F to unselect or NIL to toggle. Other nonzero values are treated as T.

Return value

T on success, or F if the object is NULL.

Description

This operation changes the button's buffer regardless of focus and calls the state callback if the value changes. The callback can read the new state with `RadioButtoGetBuffer()`. Selecting the current state also succeeds.

The caller controls redraw. Call `RadioButtoDisplay()` to update a standalone button. Use `RadioGroupSelect()` for a grouped button so the group can update its selected position, unselect the previous button and redraw both buttons.

See also