ToggleMenuItemBase

abstract class ToggleMenuItemBase(text: String, initialToggleGroup: ToggleGroup? = null) : SelectMenuItemBase, Toggle

The base class for ToggleMenuItem and RadioMenuItem. 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 buttons : ToggleButtonBase.

Inheritors

Constructors

Link copied to clipboard
constructor(text: String, 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 item in the same ToggleGroup are selected at the same time. For a ToggleMenuItem the user can choose to select no items (by clicking the selected ToggleMenuItem). But, for a RadioMenuItem this is not possible. Clicking the selected RadioMenuItem does nothing. It stays selected.

Link copied to clipboard
override var userData: Any?