User Tools

Site Tools


Privacy Policy


Version 2.50 is out since Jan 1st 2022

Frequently Asked Questions


Note for contributors

If you wish to create a new page in the DroidScript wiki, please click on the most appropriate namespace above and follow the notes for contributors there.

Because of spam, it has been necessary to add a CAPTCHA to the registration form and the save option for editing pages. You will not need to prove you are human if you are logged in, so please register.

Please feel free to improve any existing page, as well as adding new pages to increase the sum of public knowledge about DroidScript.

Formatting Syntax


This is an old revision of the document!

Table of Contents



Create toggle buttons using the CreateToggle method of the app object:

btn = app.CreateToggle( text, width, height, options );

You can allow the toggle button to auto-size by leaving out the dimensions or you can specify a width and height as decimal fractions of the screen's width and height.

Use the SetOnTouch method of your button object to set the name of a function you want to be called when the button is touched.

You can get the state of the toggle button at any time using the GetChecked method of the button. The button state is also passed into your OnTouch callback function as a parameter every time the button is touched.


built_in/togglebuttons.1410979067.txt.gz · Last modified: 2014/09/18 02:37 (external edit)