VB.NET Group Radio Buttons across different Panels

南楼画角 提交于 2020-01-05 04:02:32

问题


So I have 2 panels and the same number of radio buttons added programatically in each panel. For ex.

RB1 -> Panel1 
RB2 -> Panel1

RBo1 -> Panel2
RBo2 -> Panel2

I want to group RB1 and RBo1 and RB2 and RBo2, but when I add the radio buttons to the different panels they group each other. I tried adding RB1 and RBo2 to the same GroupBox but could not achieve the goal either. Any ideas? Is it possible to manually link the radio buttons?


回答1:


If you absolutely must have this format, you can just place each RadioButton within its own Panel; they'll be treated as separate groups, and you can then link them manually by handling the Checked event.



来源:https://stackoverflow.com/questions/9493318/vb-net-group-radio-buttons-across-different-panels

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!