C # Is it possible to make a groupBox header as a toggle?

Is it possible to make groupBox header as a toggle? If possible, I want the whole groupBox to depend on radioButton.

+6
source share
2 answers

Add RadioButton to your Form . Make sure this is not a GroupBox management.

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 .

+7
source

You cannot do it directly, no. You may be able to create your own control that combines two things. Alternatively, you just need the GroupBox not have a name and place the RadioButton on top of it. Of course, a little shreds, but it does not look bad.

+2
source

Source: https://habr.com/ru/post/949317/


All Articles