Re: Can you make RadioGroups independent?

Posted by Joey p12386 on May 19, 2007

In Reply to Can you make RadioGroups independent? posted by Lee Hallin p12462 on May 18, 2007

With a radio group you need to use the Items property. This adds indexed radio buttons to the list.

If you create two seperate radiogroups in this manner you get the desired effect. You don't need to add seperate radiobutton controls, the radiogroup handles this for you.

Then all you need to do is access RadioGroup1.ItemIndex and this returns the Index of the selected item in the group.



Would give the string value of ItemIndex.

Hope it help ^_^

: Here's what I did:
: 1) Created RadioGroup1
: 2) Added a RadioButton1 to it
: 3) Created RadioGroup2
: 4) Added a RadioButton2 to it
: 5) When I run the program, if I click RadioButton1, it gets checked. If I click RadioButton2 it gets checked BUT RadioButton1 gets cleared! Is this behavior the only way RadioGroup'd buttons work?

: In my "real" application, there are several RadioButtons in each RadioGroup.

: If I use GroupBox instead of RadioGroup, I get the desired results.

Related articles


Follow Ups