FlipToggle: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
Brendon (talk | contribs)
No edit summary
Brendon (talk | contribs)
No edit summary
Line 1: Line 1:
[[file:FlipToggle.jpg]]
[[file:FlipToggle.jpg]]


'''Description'''
== Description ==


The FlipToggle control is a slider that changes between Off and On.
The FlipToggle control is a slider that changes between Off and On.
Line 7: Line 7:
To add a FlipToggle to your app, choose the FlipToggle icon in the Toolbar, then position it on the Design Screen. Use the Property Editor to set the properties you need, then add functions to your code to respond to the events that come from the FlipToggle: usually, just onclick.
To add a FlipToggle to your app, choose the FlipToggle icon in the Toolbar, then position it on the Design Screen. Use the Property Editor to set the properties you need, then add functions to your code to respond to the events that come from the FlipToggle: usually, just onclick.


'''Properties'''
== Properties ==


Standard [[properties and methods|properties]] are supported, plus:
Standard [[properties and methods|properties]] are supported, plus:
Line 21: Line 21:
|}
|}


'''Events'''
== Events ==


Standard [[events|events]] are supported.
Standard [[events|events]] are supported.


'''Example'''
== Example ==


<pre>
<pre>
Line 31: Line 31:
</pre>
</pre>


'''Output'''
== Output ==


<pre>
<pre>
Off
Off
</pre>
</pre>
[[Category:Language Reference]]

Revision as of 16:33, 17 August 2012

Description

The FlipToggle control is a slider that changes between Off and On.

To add a FlipToggle to your app, choose the FlipToggle icon in the Toolbar, then position it on the Design Screen. Use the Property Editor to set the properties you need, then add functions to your code to respond to the events that come from the FlipToggle: usually, just onclick.

Properties

Standard properties are supported, plus:

Value() The value of the control.
setValue() Set the value to one of the titles.
titleLeft The name of the left title. Design only.
titleRight The name of the left title. Design only.

Events

Standard events are supported.

Example

Print FlipToggle1.value

Output

Off