Making the radio button turn on and off

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Glenn Boyce
Posts: 137
Joined: Thu Jul 24, 2008 11:22 pm

Making the radio button turn on and off

Post by Glenn Boyce » Tue Jan 13, 2009 3:45 am

How do I get the green dot in the radio button to disappear when I push the button?

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Post by Janschenkel » Tue Jan 13, 2009 6:30 am

The easiest way, is by placing all the relevant radio buttons into a group, and setting the group's radioBehavior property to true - then you can use the hilitedButton, hilitedButtonId or hilitedButtonName properties to get and set the hilited radio button.

If you cannot place them into a group, you can still make your life easier using the family property, setting this property to the same integer value for all your radio buttons. But then you're going to have to loop over the buttons yourself to see which one has the hilite.

And in case you really want to do it all yourself, you can set the hilited property of your individual radio buttons to true or false.

Now, if you're looking for a way to toggle the same option on and off, you should use a checkbox rather than a radio button...

HTH,

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

Glenn Boyce
Posts: 137
Joined: Thu Jul 24, 2008 11:22 pm

Post by Glenn Boyce » Tue Jan 13, 2009 10:34 pm

Thanks Jan

Post Reply