How to group Radio button without using GroupBox ?
-
i have 4 radio button, for example, radiobutton 1 is A1 radiobutton 2 is A2 radiobutton 3 is B1 radiobutton 4 is B2 While i run the application, by default, it only allow me to checked either one of four radiobutton. i want my application group it into two group, A1 and A2 in one group and B1 and B2 in another group. So, while i Click A1, A2 will be unchecked and while i click A2, A1 will be unchecked as well, and B1 and B2 is remain the same. So , this criteria also same as B1 and B2, while i click either B1 and B2, it is no effect A1 and A2, how to gorup it ar? without put it into group box, anybody can help me ?
Best regards, Chee ken
-
i have 4 radio button, for example, radiobutton 1 is A1 radiobutton 2 is A2 radiobutton 3 is B1 radiobutton 4 is B2 While i run the application, by default, it only allow me to checked either one of four radiobutton. i want my application group it into two group, A1 and A2 in one group and B1 and B2 in another group. So, while i Click A1, A2 will be unchecked and while i click A2, A1 will be unchecked as well, and B1 and B2 is remain the same. So , this criteria also same as B1 and B2, while i click either B1 and B2, it is no effect A1 and A2, how to gorup it ar? without put it into group box, anybody can help me ?
Best regards, Chee ken
cheeken2u wrote:
without put it into group box
Why not?? :confused:
-
i have 4 radio button, for example, radiobutton 1 is A1 radiobutton 2 is A2 radiobutton 3 is B1 radiobutton 4 is B2 While i run the application, by default, it only allow me to checked either one of four radiobutton. i want my application group it into two group, A1 and A2 in one group and B1 and B2 in another group. So, while i Click A1, A2 will be unchecked and while i click A2, A1 will be unchecked as well, and B1 and B2 is remain the same. So , this criteria also same as B1 and B2, while i click either B1 and B2, it is no effect A1 and A2, how to gorup it ar? without put it into group box, anybody can help me ?
Best regards, Chee ken
You suppose to use group box to group radio buttons. If you don't want to that you can still imitate the radiobuttons as grouped in your code. Please see the example below. I have controled two radio buttons out of a group box. If one's state changes, I change the other radio button's states also. :wtf:
Private Sub RadioButton1_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged Select Case RadioButton1.Checked Case True RadioButton2.Checked = False Case False RadioButton2.Checked = True End Select End Sub Private Sub RadioButton2_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged Select Case RadioButton2.Checked Case True RadioButton1.Checked = False Case False RadioButton1.Checked = True End Select End Sub
What a curious mind needs to discover knowledge is noting else than a pin-hole.
-
i have 4 radio button, for example, radiobutton 1 is A1 radiobutton 2 is A2 radiobutton 3 is B1 radiobutton 4 is B2 While i run the application, by default, it only allow me to checked either one of four radiobutton. i want my application group it into two group, A1 and A2 in one group and B1 and B2 in another group. So, while i Click A1, A2 will be unchecked and while i click A2, A1 will be unchecked as well, and B1 and B2 is remain the same. So , this criteria also same as B1 and B2, while i click either B1 and B2, it is no effect A1 and A2, how to gorup it ar? without put it into group box, anybody can help me ?
Best regards, Chee ken
Hi Chee Ken, If you don't want to use GroupBox controls to group your radio buttons, because you don't want the border and title of that control, you can use Panel controls, which are practically the same, but have no visible borders and no title text. Otherwise they work pretty much the same way. Good luck, Johan
My advice is free, and you may get what you paid for.