Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# Is it possible to make a groupBox title as a radio button?

Tags:

c#

winforms

Is it possible to make a groupBox title as a radio button ? If it's possible, I want to make the whole groupBox dependant of the radioButton.

like image 228
user2576562 Avatar asked Jul 12 '13 13:07

user2576562


2 Answers

Add a RadioButton to your Form. Make sure it's no control of the GroupBox.

Add to the constructor of your Form:

radioButton.Location = new Point(groupBox.Location.X + 13, groupBox.Location.Y - 1);

Everything else is possible through Events.

like image 133
Andy Avatar answered Sep 18 '22 17:09

Andy


You can't do this directly, no. You might be able to make a custom control that combined the two things. Alternatively you might just need to have the GroupBox not have a title and put the RadioButton over it. A little kludgy, of course, but it doesn't look bad.

like image 20
Tim Avatar answered Sep 22 '22 17:09

Tim