Link to home
Start Free TrialLog in
Avatar of BushBill
BushBillFlag for United States of America

asked on

missing group property in visual studio

i cannot locate the group property setting for a radio button in visual c
Avatar of Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger)
Flag of Canada image

There is nothing such as a group property setting, so I am not sure what you are trying to do here.

RadioButtons in .NET do not work the same way as they do in other environments such as Microsoft Access.

They can be used in many different containers, so the notion of a group does not exist. If they are in a GroupBox, you can reference the GroupBox itself with:
DirectCast(RadioButton1.Container,GroupBox)

Open in new window

From the GroupBox, if you want to know which button is checked, you would use code like this one:
For Each Button As RadioButton In GroupBox1.Controls
   If Button.Checked Then
      MessageBox.Show(Button.Text & " is activated")
      Exit For
   End If
Next

Open in new window

Avatar of BushBill

ASKER

I want the radio buttons to be checked independently of each other. MSDN documentation saya that behavior requires the Group property of the first radio button to be false. I cannot locate this property.
ASKER CERTIFIED SOLUTION
Avatar of Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger)
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial