How script the widget Switchbutton ?

Paul Richards paul at
Tue Oct 27 10:22:37 EDT 2015

Hi Ludovic, 

If when you look at the property inspector for each widget, you will see what options are available (basic TAB - which shows the house icon)

In the case of the Switch,  you can see a property for Switch on (hover mouse over and it will show you SwitchIsOn) 

An possible example of use could be:

on switchChanged pSwitchIsOn
   if pSwitchIsOn is true then 
      answer "Switch Enabled"
      answer "Switch Disabled"
   end if
end switchChanged

Paul :-)

-----Original Message-----
From: use-livecode [mailto:use-livecode-bounces at] On Behalf Of Ludovic THEBAULT
Sent: 27 October 2015 14:03
To: How to use LiveCode <use-livecode at>
Subject: How script the widget Switchbutton ?


I play with Livecode 8 dp7. Widget are cool but how use it ? 
If i put a switchbutton on my stack and put this script :

on mouseup
answer the hilite of me
end mouseup

nothing happen.

I cannot find any example in the doc.  


use-livecode mailing list
use-livecode at
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the use-livecode mailing list