CheckBox

A CheckBox can have either two states : selected == true , selected == false. Or, if you set allowIndeterminate, then it can have three states :

state          |  indeterminate value |  selected value
-------------------------------------------------------
unselected     |  false               |  false
selected       |  false               |  true
indeterminate  |  true                |  n/a

It is displayed using one of two/three graphics. Clicking will cycle through the two/three states.

Theme DSL

"check_box" {

     graphic( Image )
     graphic( images : NamedImages, imageName: String )

     ":selected" { graphic( ... ) }
     ":intermediate" { graphic( ... ) }
}

CheckBox inherits all the features of ButtonBase.

Constructors

Link copied to clipboard
constructor()
constructor(text: String)

Properties

Link copied to clipboard
Link copied to clipboard

When set to true, this has three states, rather than the usual selected / not-selected. The third state is when indeterminate is true (and when indeterminate is true, selected has no meaning).

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

Functions

Link copied to clipboard
open override fun toString(): String