new module:ct-workbench /model /Toggle Slider(default Valueopt, label Onopt, label Offopt, labelopt)
A configurable toggle switch, used in multiple workbench tools.
To listen to the value change, add a listener directly to the value
property, e.g.
toggleSlider.value.addChangeListener(...)
Extends:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
defaultValue |
Boolean |
<optional> |
false | If |
labelOn |
String |
<optional> |
'ON' | The label to use for the ON position. |
labelOff |
String |
<optional> |
'OFF' | The label to use for the OFF position. |
label |
String |
<optional> |
'' | The contents of a |
Extends
Methods
click()
Toggle the value between true and false