class domkit::ButtonGroup

sys::Obj
  domkit::ButtonGroup

@Js

Source

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

add

This add(Elem button)

Source

Convenience to add a button to buttons.

buttons

Elem[] buttons := Elem[,]

Source

Buttons in this group.

enabled

Bool enabled := true

Source

Set enabled state for this button group.

inheritEnabled

Bool inheritEnabled := true

Source

If true, child buttons will inherit the enabled state of this ButtonGroup. If false buttons can be enabled or disabled independent of group.

onBeforeSelect

Void onBeforeSelect(|ButtonGroup,Int->Bool| f)

Source

Callback before a selection changes. Return true to select the new button (default), or false to keep the currently selected button.

onSelect

Void onSelect(|This| f)

Source

Callback when selection in group has changed.

selIndex

Int? selIndex := null

Source

Index of selected button, or null if none selected.