class RadioGroup

A RadioGroup is used to coordinate the activity of a group of RadioButtons. It ensures that only one of the RadioButtons is on at a time, and provides a value property which is equal to the value of the currently selected RadioButton. It also provides an action property which is invoked when the user changes the selection.

You can iterate over the RadioButtons contained in a RadioGroup, which means you can use a RadioGroup directly in the place_row and place_column methods of a container.

Properties

value
The value of the currently selected RadioButton. Setting this property updates the states of the RadioButtons accordingly.
action
Action to perform when the value changes as a result of the user clicking on a radio button.

Constructor

RadioGroup(items)
Constructs a RadioGroup containing the given list of RadioButtons.

Methods

add_item(item)
add_items([
item, ...])
Adds one or more RadioButtons to this group.
remove_item(item)
remove_items([
item, ...])
Removes one or more RadioButtons from this group.

Operations

iter(group)
Returns an iterator over the RadioButtons contained in the group.

---