I have 2 groups of radio boxes on a dialog. How can I specify which button is in which group? Because right now when I select one, all the others get unselected, even the ones from the other group.
Step 1 − Drag a group box and three radio buttons and remove the Caption of Static Text control. Step 2 − Add event handler for all the three radio buttons. Step 3 − Add the Value variable for the Static Text control. Step 4 − Here is the implementation of three event handlers.
You group radio buttons by drawing them inside a container such as a Panel control, a GroupBox control, or a form. All radio buttons that are added directly to a form become one group. To add separate groups, you must place them inside panels or group boxes.
Radio buttons allow a user to select a single option among multiple options. You can set the Choice Value of each option, for each button, as well as group these buttons by giving them the same Group Name.
Only one radio button in a group can be checked. You have two radio buttons with different names. This means that you have two radio groups, each containing one radio button. You need to put them in the same group (by making them share a name) if you only want one of them to be selected.
The tab order of the dialog, and the Group
property completely dictates which radio buttons belong to which groups.
Each radio button belongs to the group of the previous main radio button in the tab order. The main radio button has the Group property set to True
.
You can set the tab order by going to the dialog editor and pressing Ctrl+D. You then click on each control from 1 to N in the order you want the tabbing to go.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With