PDA

View Full Version : RadioButtons label vs value


DBorder
07-21-2009, 06:00 PM
Helo guys, i'm stuck on something with the radioButtons.
I try to use radiobuttons with 2 value. ie i have a Labels:#("4 section","8 sections") now i want to say when the radio "4 Sections" is selected, it return 0 as a value while "8 Sections" return 1 as a value.
How can i do that? thanks for your kind help.

Piflik
07-21-2009, 08:48 PM
<radiobuttons>.state Integer

The number of the currently selected radio button in the order specified in the labels: array, or 0 if none is selected.


Rad_But.state would be 1 if the first element is active, 2 if the second one is active and 0 if none is selected.

If you really want it to be 0 or 1, all you'll have to do is save the state into a variable and then subtract 1.

DBorder
07-21-2009, 09:01 PM
damn i missed that point...
You're right. i think that's what i'll have to do.
thanks

CGTalk Moderation
07-21-2009, 09:01 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.