Making the radio button turn on and off
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 137
- Joined: Thu Jul 24, 2008 11:22 pm
Making the radio button turn on and off
How do I get the green dot in the radio button to disappear when I push the button?
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
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.
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
www.quartam.com