Table Switchable

Switchable component: checkbox, radio or switch.

This is a simple Component which draws a checkbox, radio or switch, and handles click and Space key to (un)check, switch on/off.

See
SMDialog:addSwitchable

Summary

Return typeFunction and summary
booleanOnChange(Dialog dlg, Switchable switch, boolean state)
Function fired when state is switched.

Function

Switchable.OnChange(Dialog dlg, Switchable switch, boolean state)

Function fired when state is switched.

ParameterTypeDefaultDescription
dlgDialog The MyrScript Dialog object
switchSwitchable The switchable component
stateboolean The new state of the switchable
Return
boolean: Return true or nil to confirm the state change, false to cancel the change.