Toggling a Single Radio Button
bobsneidar at iotecdigital.com
Mon Mar 23 10:35:58 EDT 2015
I’ve seen radio buttons set up to work like checkboxes before, mostly in web browser built into appliances, and thought what an odd way to use a checkbox! I agree that single on/off choices should be checkboxes, and multiple choice should be a group of radio buttons.
> On Mar 9, 2015, at 12:02 , Klaus major-k <klaus at major-k.de> wrote:
> Hi Ray,
>> Am 09.03.2015 um 19:58 schrieb Ray <ray at linkit.com>:
>> Does anybody know how to toggle a single radio button so it behaves like a check box? That is, if it's highlighted when you click it the button becomes dehighlighted and vice versa?
>> This does not work:
>> on mouseUp
>> if the hilite of me = true then
>> set the hilite of me to false
>> else set the hilite of me to true
>> end mouseUp
>> Any ideas for this simple task?
> yep :-)
> 1. UNCHECK "autohilite" for your lonesome radio button!
> 2. Now your script should work, or just use this one-liner:
> on mouseUp
> set the hilite of me to NOT (the hilite of me)
> end mouseUp
> Klaus Major
> klaus at major-k.de
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode