FlipToggle: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
(Add javascript snippet)
Line 25: Line 25:
Standard [[events|events]] are supported.
Standard [[events|events]] are supported.


== Example ==
== Example (Basic) ==


<pre>
<pre>
Print FlipToggle1.value
Print FlipToggle1.value
</pre>
== Example (JavaScript) ==
<pre>
NSB.Print(FlipToggle1.value);
</pre>
</pre>



Revision as of 19:22, 19 May 2013

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 (Basic)

Print FlipToggle1.value

Example (JavaScript)

NSB.Print(FlipToggle1.value);

Output

Off