Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set two radiobuttons in one group and two in another group?

Tags:

delphi

vcl

I have total 4 radiobuttons on my form,I want to set the first two buttons in one group and the second two in another group so that I can check one from the first group and one from the second group.

Right now,if I check one from the first group,the one from the second group becomes unchecked.

I've always wondered how to do this and I believe now's the time to figure this out. :)

like image 533
Ivan Prodanov Avatar asked Jul 26 '09 09:07

Ivan Prodanov


People also ask

How do I have two sets of buttons in Excel?

Under Insert controls, click Option Button. In the Insert Option Buttons dialog box, enter the number of buttons that you want to insert, and then click OK.

How do you group radio buttons together?

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.

How do I select multiple radio buttons in HTML?

Once the radio group is created, selecting any radio button in that group automatically deselects any other selected radio button in the same group. You can have as many radio groups on a page as you want, as long as each group has its own name.


1 Answers

To quote from the trusted Delphi 5 help:

By default, all radio buttons that are directly contained in the same windowed control container, such as a TRadioGroup or TPanel, are grouped. For example, two radio buttons on a form can be checked at the same time only if they are contained in separate containers, such as two different group boxes.

like image 62
mghie Avatar answered Sep 29 '22 23:09

mghie