.section Widgets
.topic widget.radio
.title Radio Button
.toc 0 Radio Button
.index Radio
.index RadioGroup
.index wgtRadio
.index wgtRadioGroup
.index wgtRadioGroupSetSelected
.index wgtRadioGetIndex

.h2 Radio Button

A mutually exclusive selection control. Radio buttons must be placed inside a radio group container. Only one radio button within a group can be selected at a time.

Header: widgets/widgetRadio.h

.h3 Creation

.code
WidgetT *grp = wgtRadioGroup(parent);
WidgetT *r1  = wgtRadio(grp, "Option A");
WidgetT *r2  = wgtRadio(grp, "Option B");
.endcode

.h3 Macros

.table
  Macro                                Description
  -----                                -----------
  wgtRadioGroup(parent)                Create a radio group container.
  wgtRadio(parent, text)               Create a radio button inside a group.
  wgtRadioGroupSetSelected(w, idx)     Set the selected radio button by index within the group.
  wgtRadioGetIndex(w)                  Get the index of the currently selected radio button.
.endtable

.h3 Events

.table
  Callback     Description
  --------     -----------
  onClick      Fires on the radio button when clicked.
  onChange     Fires when the selection changes.
.endtable

.h3 Properties (BASIC Interface)

.table
  Property     Type       Access       Description
  --------     ----       ------       -----------
  Value        Integer    Read-only    Index of the currently selected radio button in the group.
.endtable

.h3 Methods (BASIC Interface)

.table
  Method          Description
  ------          -----------
  SetSelected     Set the selected radio button by index.
.endtable

.hr
