Page 1 of 1

Hilite uncheck one at a time

Posted: Tue Aug 04, 2009 3:08 pm
by hamlynart
Hi Folks,

When I group radio buttons I can select to Hilite one at a time and it works fine. If I group check boxes I can also select to Hilite one at a time but unfortunately it doesn't work.

Any Thoughts?

Jim H

Posted: Tue Aug 04, 2009 3:27 pm
by gyroscope
Hi Jim

As far as I'm aware, radio buttons are designed (coded) to be used that way, i.e function together as a group, but check boxes aren't. I guess you'll have to do your own coding if you needed that...

:)

Posted: Tue Aug 04, 2009 3:40 pm
by SparkOut
Indeed, the point of the checkbox lists is so that a user can choose multiple options from the list, whereas a radio group is deliberately mutually exclusive.
It's not hard to make a group of checkbox buttons do the same thing though:

Code: Select all

on mouseUp
   set the hilitedButton of me to zero
   set the hilite of the target to true
end mouseUp
Put this in the group script and it should highlight the single most recently checked box.
If you want to have an action for each checkbox in the group then you can still code an individual script for the on mouseUp event in each checkbox (or use behaviors of course!) but you will also have to pass the mouseUp message in each handler.

Posted: Tue Aug 04, 2009 3:55 pm
by hamlynart
Both very interesting and both very useful to know.

Thanks a million.

Jim H

Posted: Tue Aug 04, 2009 5:19 pm
by bn
Jim,

just keep in mind that a user expects muliple checkboxes to be selectable as Sparkout pointed out. You might confuse the users if you force a radiobutton behaviour on checkboxes (Human Interface etc). At least I would be confused.

regards

Bernd

Posted: Tue Aug 04, 2009 5:43 pm
by SparkOut
That's right - I should have said, although it's easy enough to make that behaviour, I don't think it is desired.