Click here to Skip to main content
15,887,881 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all,
i m creating a windows form and using 4 radio buttons on the same form.
and i dont want to use group box or panel.
see my prob...

Suppose there are 4 radion buttons on the form. There is no groupbox or
panel to seperate them. By default, the 4 radio buttons are mutually
exclusive. Is it possible to group them into two groups?

For example,
Gender ( )rb1 ( )rb2
Marital status ( )rb3 ( )rb4

anyone have any idea about it?
thanks in advance
Posted

The radio groups do not have to be grouped as children of the control GroupBox. All you need is to make them children and the same control, no matter of what type. Their parent could be an instance of Panel or any custom control derived from this type.

—SA
 
Share this answer
 
Comments
Sander Rossel 19-Mar-12 17:11pm    
My 5, good answer.
Sergey Alexandrovich Kryukov 19-Mar-12 17:29pm    
Thank you, Naerling.
What? You are not on vacation yet?
--SA
Sander Rossel 19-Mar-12 17:41pm    
Nah, leaving the day after tomorrow.
Will be packing tomorrow evening :)
ProEnggSoft 20-Mar-12 0:22am    
Good answer. +5.
Sergey Alexandrovich Kryukov 20-Mar-12 1:07am    
Thank you.
--SA
Sure, you can select the two Gender Radio Buttons and set GroupName property to any value "Gender" for example and then select the Next two Radio Buttons and set the GroupName property to a different value
 
Share this answer
 
Comments
bkthebest 21-Mar-12 12:00pm    
thanks for answering,
but it would possible only in web application and i am talking about windows application

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900