Radiobuttons as a group in different panels

I am using C# to develop a WindowsForms application. I created a form with some panels. Each panel has a RadioButton . When I click RadioButton and then the other, both are checked.

How did I simulate that all RadioButtons are in the same group, so you can only check one, and the rest are not checked?

Of course, I can control the checkedChanged event for each RadioButton ... but is there a better solution?

Thanks in advance.

+6
source share
1 answer

RadioButtons are automatically linked if they are inside the same parent. Since you want them to live in different containers, you will need to bind them manually.

+2
source

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


All Articles