- Index
- »
- domkit
- »
- ButtonGroup
type
ButtonGroup
ButtonGroup groups a set of toggle or radio buttons and handles making sure only one button in group is selected at a time.
See also: docDomkit, ToggleButton
, RadioButton
fields
buttons |
Buttons in this group. |
---|---|
enabled |
Set enabled state for this button group. |
inheritEnabled |
If |
selIndex |
Index of selected button, or |
methods
add |
Convenience to add a button to |
---|---|
onBeforeSelect |
Callback before a selection changes. |
onSelect |
Callback when selection in group has changed. |
Slot Details
add
buttons
Elem[] buttons := Elem[,]
Buttons in this group.
enabled
Bool enabled := true
Set enabled state for this button group.
inheritEnabled
onBeforeSelect
Void onBeforeSelect(|ButtonGroup,Int->Bool| f)
Callback before a selection changes. Return true
to select the new button (default), or false
to keep the currently selected button.
onSelect
selIndex
Int? selIndex := null
Index of selected button, or null
if none selected.