Switches are a variant of toggle buttons with another look.
Use the SetOnTouch method of the switch object to set the name of a function you want to be called when the switch is touched.
You can get the state of the switch at any time using the GetChecked method. The switch state is also passed into your OnTouch callback function as a parameter every time the switch is touched.
Methods
The following methods are available on the Switch object:
Batch(
properties )
Focus()
GetAbsHeight() → Number: integer
GetAbsWidth() → Number: integer
GetChecked() → Boolean
GetParent() → app object
GetText() → String
GetTextSize(
mode )
→ Number
GetType() → String: “Switch”
Gone()
Hide()
IsEnabled() → Boolean
IsVisible() → Boolean
SetEnabled(
enable )
Show()