Radio buttons as indicator lights

Graham graham.samuel at wanadoo.fr
Fri Sep 5 15:16:10 EDT 2003


On Fri, 05 Sep 2003 01:57:22 -0400, Ken Norris <pixelbird at interisland.net> 
wrote:

>Hi Graham,
>
>Just so you know, there are two Ken's actively on this list. Ken Ray's the
>pro, but I'm getting better at getting around Rev.

Yes, in fact I do know - Ken Ray has been giving me excellent advice since 
my SuperCard days...

>[...]



>Alternative solution:
>
>In the multi-line msg box, write a script to change all your buttons to
>style "round", set the hiliteColor to your choice, and give them all a
>family number, probably "1" (see the "family" keyword in the Transcript
>Dictionary).
>
>NOW, you can put a noop grc over the top of all of them to intercept mouse
>clicks, thus blocking the user from clicking them.
>
>This family of buttons will take on radioBehavior characteristics, i.e., you
>can only set the hilite of one at a time, even by script, thus:
>
>set the hilite of button x to true
>
>...will set the hilite of _only_ that button to true, meaning whatever the
>hiliteColor of that button is will show that color while all the rest are
>blank (clear).
>
>I made a little stack with 30 of these things (all of them green, but they
>could each have been a different color, any of 256 colors) in it that
>lighted randomly. Reminded me of those TV depictions of computers back in
>the '50's. Now I just need to add wierd little sounds to complete the
>effect.

That's really cool, Ken! I didn't know about 'family' (you can't set it 
using the property inspector, so it's hard to see how anyone would find out 
about it). I will have a lot of families, I guess, but the feature is worth 
using. No idea why it goes with backgroundBehavior - I can imagine this 
could be a showstopper in some situations, tho' not the one I'm working on.

I'm sure I could provide you with a whole repertoire of wierd little sounds...

Back to the grindstone.

Thanks

Graham

---------------------------------------------------
Graham Samuel / The Living Fossil Co. / UK & France  





More information about the use-livecode mailing list