在 Delphi 2010 中,我将 2 个单选组放在一个表单上,然后向每个组添加 2 个按钮。所以总共有4个按钮。
问题是按钮的Checked
属性表现得好像所有 4 个按钮都在同一个单选组中。即,在任何时候都只能检查 4 个按钮中的 1 个。在设计和运行时都是如此。
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
等等等等更多的对象
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
如何取消这两个组的链接?