Basics
Guides
API Reference
Basics
Guides
API Reference
[12:7] extends: FxObj, Control
Wraps JavaFX ToggleGroup, which ensures that at most one ToggleButton or RadioButton in the group is selected at any time. When the user selects a new button, the previously selected button is automatically deselected. This class provides methods to retrieve the text of the currently selected toggle and to register a callback that fires whenever the selection changes.
ToggleGroup ()
Initializes a new ToggleGroup instance.
this objectgetSelected ()
Retrieves the text of the currently selected ToggleButton in the group.
string The text of the selected ToggleButton, or an empty string if none is selected.onChange (callback OnChange)
Sets a callback function to execute when the selected ToggleButton changes.
OnChange The callback function for handling selection change events.this object for chaining
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.