ToggleButton

fun ToggleButton(    posX: Number = 0,     posY: Number = 0,     width: Number = DEFAULT_TOGGLE_BUTTON_WIDTH,     height: Number = DEFAULT_TOGGLE_BUTTON_HEIGHT,     text: String = "",     font: Font = Font(),     alignment: Alignment = Alignment.CENTER_LEFT,     isWrapText: Boolean = false,     isSelected: Boolean = false,     toggleGroup: ToggleGroup = ToggleGroup(),     visual: Visual = Visual.EMPTY)

Creates a ToggleButton.

Parameters

posX

Horizontal coordinate for this ToggleButton. Default: 0.

posY

Vertical coordinate for this ToggleButton. Default: 0.

width

Width for this ToggleButton. Default: DEFAULT_TOGGLE_BUTTON_WIDTH.

height

Height for this ToggleButton. Default: DEFAULT_TOGGLE_BUTTON_HEIGHT.

text

Text to be displayed for this ToggleButton.

font

Font to be used for this ToggleButton. Default: default Font constructor.

alignment

Alignment to be used for this ToggleButton.

isWrapText

Defines if text should be wrapped, if it exceeds the label's width. Default: false.

isSelected

The initial state for this ToggleButton. Default: false.

toggleGroup

The ToggleGroup of this ToggleButton. Default: empty group.

visual

Background Visual. Default: Visual.EMPTY.