G
Guest
Hello,
GroupBox1 contains 3 radiobuttons. Is there a builtin way - a Container
property - in the groupbox control to determine which radiobutton is checked
- if any? I did not see anything like GroupBox1.Value, but in pseudocode I
am thinking something like
Console.WriteLine(GroupBox1.Value.ToString)
I tried
Console.WriteLine(GroupBox1.Container.Components.Count.ToString)
but got an Object Not Set error.
Am I limited to looping through an array of radiobuttons to see which one is
checked?
Dim arrRads() as radioButton
arrRads = New RadioButton(){rad1, rad2, rad3}
....
For Each rad In arrRads
If rad.Checked.Equals(True) Then Console.WriteLine(rad.Name " = True")
Next
What is the correct way - most efficient way to determine - return the
checked radiobutton in the GroupBox? Say you have GroupBox1 and GroupBox2,
they each contain 3 radiobuttons. Are the 3 radiobuttons in GroupBox1 part
of GroupBox1 and the 3 in GroupBox2 part of GroupBox2 or is each radiobutton
an independent entity to be treated independently of the Groupbox it is
contained in?
Thanks,
Rich
GroupBox1 contains 3 radiobuttons. Is there a builtin way - a Container
property - in the groupbox control to determine which radiobutton is checked
- if any? I did not see anything like GroupBox1.Value, but in pseudocode I
am thinking something like
Console.WriteLine(GroupBox1.Value.ToString)
I tried
Console.WriteLine(GroupBox1.Container.Components.Count.ToString)
but got an Object Not Set error.
Am I limited to looping through an array of radiobuttons to see which one is
checked?
Dim arrRads() as radioButton
arrRads = New RadioButton(){rad1, rad2, rad3}
....
For Each rad In arrRads
If rad.Checked.Equals(True) Then Console.WriteLine(rad.Name " = True")
Next
What is the correct way - most efficient way to determine - return the
checked radiobutton in the GroupBox? Say you have GroupBox1 and GroupBox2,
they each contain 3 radiobuttons. Are the 3 radiobuttons in GroupBox1 part
of GroupBox1 and the 3 in GroupBox2 part of GroupBox2 or is each radiobutton
an independent entity to be treated independently of the Groupbox it is
contained in?
Thanks,
Rich