The RadioButtonGroup is a basic control that is used to provide an area for making an interactive choice out of a set of options. The RadioButtonGroup represents a list with items where exactly one item can be selected in a session. For the representation of the single group entries, the RadioButton items are created automatically. For the radio button choice, mouse and keyboard navigation usage is supported.
Following you can find an example for a simple RadioButtonGroup with three radio buttons. When the user selects a radio button, the select
event is fired. To show the function of this select
event,
in this example an alert popup is called where the popup is displaying the text of the selected radio button item, this of course also could be any other text.
A RadioButtonGroup can have multiple columns. In the following example, the radio buttons are created row-wise.
The radio button that shall be initially selected at runtime can be set by using the selectedIndex
property.
editable
and enabled
A RadioButtonGroup as a whole can be set to editable true or false. The single radio buttons can have an enabled or disabled status.