Want radio behavior in pushbuttons

Sarah sarahr at genesearch.com.au
Thu Aug 14 19:37:00 EDT 2003


> It was a little bit of a shock when I saw that we can't set the family
> property of any kind of buttons to make them work like radio buttons
> together like we could in HC. But undaunted, I unset the auto-hilite
> properties of the two pushbuttons I was working on and put mouseDown
> scripts in them. In button "Run":
>
> on mouseDown
>   hilite me
>   unhilite btn "stop"
> end mouseDown
>
> and the converse in button "stop".
>
> On OS X using Rev 2.0.2 the buttons don't work as expected; they both
> unhilite upon exiting the mouseDown handlers. I put a wait 1 sec just
> before exiting the handlers and could see the hilite for just that 
> long.
> I tried square style buttons with the same result. Shouldn't the 
> buttons
> stay hilited? And if so, does this mean I have to learn how to use
> Bugzilla now?
>
If you are actually using radioButtons, then you need to group them 
after which there are several properties you can use and set 
(hilitedButton, hilitedButtonID, hilitedButtonName). If the buttons are 
not radioButtons, them I'm not sure the automatic features will work, 
but as you have already tried, the hilites can be set manually. The 
problem with them unhiliting is because they are set to autoHilite i.e. 
they are trying to act like normal push buttons. Set the autoHilites of 
the relevant buttons to false and you can have full control over the 
button hilites.

Cheers,
Sarah
sarahr at genesearch.com.au
http://www.troz.net/Rev/




More information about the use-livecode mailing list