ToggleButtonBase

abstract class ToggleButtonBase(text: String, graphic: Node? = null, initialToggleGroup: ToggleGroup? = null) : SelectButtonBase, Toggle

The base class for ToggleButton and RadioButton. The only difference between these two, is what happens when a selected menu item is clicked. A ToggleMenuItem becomes unselected, but a RadioMenuItem stays selected.

There is an analogous class for menus : ToggleMenuItemBase.

Inheritors

Constructors

Link copied to clipboard
constructor(text: String, graphic: Node? = null, initialToggleGroup: ToggleGroup? = null)

Properties

Link copied to clipboard
override var selected: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The toggleGroup ensures that more than one button in the same ToggleGroup are selected at the same time. For a ToggleButton the user can choose to select no items (by clicking the selected ToggleButton). But, for a RadioButton this is not possible. Clicking the selected RadioButton does nothing. It stays selected.

Link copied to clipboard
open override var userData: Any?