问题
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