grouped radio buttons

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In vs.net I have a form with 2 seperate groupings, and several radio buttons
in each. Ive created all in the IDE (1.1). Both the groupings, and all the
radio buttons have different names.
However, when I run the form, all the buttons are mutually exclusive. If I
click on a button in one group, and then a button in the other group, only 1
button is clicked. I expect them to be exclusive to a grouping, but that
isnt happening.
?????
Thanks, Mark
 
Have you placed the groups of radiobuttons in separate containers such as
panels or groupboxes?
 
Yes - by "groupings" I should have said "groupboxes". I almost expected each
groupbox to a have, in its property, a collection of the radio buttons for
the groupbox, but it didnt have anything like that (at least, that I could
see).
 
That seems odd. I'm not seeing this behavior. I'm using VS.Net 2003, .Net Fx
1.1 w/ SP1. Are you sure that the radiobuttons have actually been added to
the Controls collection for the appropriate groupboxes?
 
I take it I should look in the generated code? Now that I look, they are
added to the tab, not the groupbox. I think I first added the radio buttons
and then the groupbox - perhaps I should have done it the other way around?
Thx, Tim
 
You could have either looked in the auto generated code or just moved the
radiobuttons around to see if they get clipped by the appropriate groupbox.
Yeah, if the groupbox is first selected in the designer, and you then start
double-clicking items in the toolbox, if possible they will added to the
selected control. So if you added the groupboxes first and then the
radiobuttons it should have done this correctly. However, you can always
drag the controls around on the form after the fact. So just dump the
correct radiobuttons into the correct groupboxes and that should fix the
problem.
 
Back
Top