Content:
- Methods

Switches are a variant of toggle buttons with another look.

swi = app.CreateSwitch( text, width, height, options ) → app object: Switch

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:

Focus()
GetAbsHeight() → Number: integer
GetAbsWidth() → Number: integer
GetChecked() → Boolean
GetHeight( options ) → Number
GetLeft( options ) → Number
GetParent() → app object
GetPosition( options ) → Object: { left, top, width, height }
GetText() → String
GetTextSize( mode ) → Number
GetTop( options ) → Number
GetType() → String: “Switch”
GetVisibility() → String: “Show” or “Hide” or “Gone”
GetWidth( options ) → Number
Gone()
Hide()
IsEnabled() → Boolean
IsOverlap( obj, depth ) → Boolean
IsVisible() → Boolean
Method( name, types, p1, p2, p3, p4 ) → all types
SetScale( x, y )
Show()