Radio buttons as indicator lights

Ken Ray kray at sonsothunder.com
Wed Sep 3 09:02:01 EDT 2003


Graham,

The problem comes from using the "radioBehavior" of a group of radio
buttons. Turn that off by selecting the group and unchecking "Hilite one
radio button at a time" in the properties palette.

Then, script it yourself by setting the "hilitedButton" or
"hilitedButtonName" of the group, as in:

  set the hilitedButton of group "indicators" to 2

OR

  set the hilitedButtonName of group "indicators" to "My Button"

Nothing happens when the user clicks, but you can set it in a script.

HTH,

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/ 

> -----Original Message-----
> From: use-revolution-admin at lists.runrev.com 
> [mailto:use-revolution-admin at lists.runrev.com] On Behalf Of Graham
> Sent: Wednesday, September 03, 2003 8:07 AM
> To: RunRev Users List
> Subject: Radio buttons as indicator lights
> 
> 
> Thanks to several people who put me on the right track to get 
> radio buttons 
> to work via scripting.
> 
> I've now got another problem. I admit I'm slightly abusing 
> the radio button 
> idea: normally the user clicks on one button and that turns 
> off any hilited 
> one in the set. In my case, I **only** want this effect via 
> scripting, 
> since the user is just seeing the buttons as indicator lights 
> - in other 
> words I want there to be no effect if the user clicks on a button.
> 
> This turns out to be more difficult than I thought. I have turned off 
> everything I can think of (apart from visibility!) in the individual 
> buttons in the group, put dummy 'mouseUp' and (even) 
> 'mouseDown' messages 
> in the buttons and in the group itself to 'soak up' the mouse 
> clicks, but I 
> still get a residual effect, which is that when the user clicks on a 
> non-hilited button, then the hilited button turns off. This 
> is the same as 
> if I'd set the hilitedButton of the group to zero via script. Further 
> clicks have no effect.
> 
> I just want to zap this last effect but I don't know how to 
> do it. If I 
> can't find a solution, I will have to stand down the whole 
> radio button 
> idea and do it all by scripting - perfectly possible, but a pain.
> 
> TIA for any advice.
> 
> Graham
> 
> ---------------------------------------------------
> Graham Samuel / The Living Fossil Co. / UK & France  
> 
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com 
> http://lists.runrev.com/mailman/listinfo/use-> revolution
> 





More information about the use-livecode mailing list