这是我写的禁用表单上RadioButton的代码,没有实现想要的结果,帮忙分析下
//窗体显示事件
procedure TLLCT.BizFormShow(Sender: TObject);
begin
if DocView5.Doc<>nil then
DisEnableControl(TSheetDoc(DocView5.Doc));
end;
//禁用某个组件上的RadioButton
procedure TLLCT.DisEnableControl(AComponent:TComponent);
var
i:integer;
begin
for i:=0 to AComponent.ComponentCount-1 do
begin
if AComponent.Components is TRadioButton then
begin
TRadioButton(AComponent).Enabled:=False;
end;
//DisEnableControl(AComponent);
end;
end;