RadioGroup

RadioGroupNew

Create an empty radio group in a terminal rectangle

Syntax

Signature
RadioGroup     *RadioGroupNew( int top, int left, int bottom, int right );

Arguments

top, left, bottom, right the inclusive screen bounds of the group. NIL is invalid for any coordinate.

Return value

The new RadioGroup object, or NULL when a coordinate is NIL. Release it with RadioGroupFree().

Description

Include xdev-wtui-classes.h. The group starts empty, without a selection or input focus. The caption and message are empty. The caption starts at `top, left + 2`, and the default frames are `B_SINGLE` without focus and `B_DOUBLE` with focus.

Create options with `RadioButtoNew()` and add them with `RadioGroupAddItem()`. The group takes ownership of each added button. Set an initial choice with `RadioGroupSelect()` and draw the complete group with `RadioGroupDisplay()`.

Use `RadioGroupSetFocus()` before navigating through the options with `RadioGroupNextItem()` or `RadioGroupPrevItem()`. The C methods report success or failure with logical results so the caller can check each operation. The corresponding xBase methods return the object.

See also