Search code examples
vb.netradio-buttongroupbox

VB.NET Group Radio Buttons across different Panels


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?


Solution

  • 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.