Type Boolean Library widget.* Revision Release 2024.3703 Keywords widget, switch, radio, on-off, checkbox, SwitchWidget, isOn See also widget.newSwitch() SwitchWidget
The read-only state of a SwitchWidget, either true
or false
.
For fine-tuning purposes, this value differs slightly depending on whether the onPress
or onRelease
listener is specified in the switch constructor. When reading this property via the onPress
listener type, the current state of the switch is reported, meaning its state before the actual switch state change occurs. When reading this property via the onRelease
listener type, the resulting state of the switch is reported, meaning its state after the switch state change occurs.