With VCL, we had a TRadioGroup
class with an Items
property you could modify at design time. With Firemonkey, we only have the TRadioButton
class.
From what I understand, if you add objects of type TRadioButton
as children to other container objects (e.g. TPanel
, TGroupBox
), these containers will effectively act like the VCL TRadioGroup
objects.
However, these individual radio buttons seem to behave as if they are all children of the same parent. If you select a radio button in group A, and then select a radio button in group B, the radio button in group A is deselected.
How can I get radio buttons in one container object to not deselect radio buttons in other container objects?
Here's an example of my form design:
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.
Right mouse click and select Wrap in New Radio Button Group. This will group them together in their own radio button list. Hope this helps.
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.
Set the GroupName
properties of the buttons. Radio buttons with the same group name will act as a separate group.
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