In Delphi 2010, I have placed 2 radio groups onto a form then added 2 buttons to each group. so there are 4 buttons in total.
The problem is that the buttons’ Checked properties behave as if all 4 buttons are in the same radio group. I.e., only 1 of the 4 buttons can be checked at any time. This is true both at design and run time.
object RadioGroup1: TRadioGroup
Left = 14
Top = 314
Width = 177
Height = 35
Caption = 'Series 2 Axis'
TabOrder = 14
end
object RButtonLeftAxis: TRadioButton
Left = 91
Top = 326
Width = 41
Height = 17
Caption = 'Left'
TabOrder = 12
OnClick = RButtonLeftAxisClick
end
object RButtonRightAxis: TRadioButton
Left = 138
Top = 326
Width = 45
Height = 17
Caption = 'Right'
Checked = True
TabOrder = 13
TabStop = True
OnClick = RButtonRightAxisClick
end
blah blah more objects
object RadioGroup2: TRadioGroup
Left = 8
Top = 146
Width = 113
Height = 69
Caption = 'Output Type'
TabOrder = 33
end
object RadBtnkWh: TRadioButton
Left = 20
Top = 165
Width = 65
Height = 17
Caption = 'kWh'
TabOrder = 34
OnClick = RadBtnkWhClick
end
object RadBtnLossFact: TRadioButton
Left = 20
Top = 188
Width = 81
Height = 17
Caption = 'Loss Factors'
TabOrder = 35
OnClick = RadBtnLossFactClick
end
How do I unlink these 2 groups?
It seems you have added radio buttons to TRadioGroup manually. Don’t do that. Just click on the proerty Items of the radio group and write the strings (name of various radio buttons) there. And you get one radio group ready !