如何批量更改控件属性,在线等。。。。
老子 2006-08-12 06:41:00 偶是这样写的,:
for I := 0 to ControlCount -1 do
begin
if (Controls[I] is TEdit) then
(controls[i] as TEdit).Enabled := enable;
if (controls[i] is TMemo) then
(controls[i] as TMemo).Enabled := enable;
if (controls[I] is TComboBox) then
(Controls[i] as TComboBox).Enabled := enable;
if (controls[i] is TCheckBox) then
(controls[I] as TCheckBox).Enabled := enable;
if (controls[i] is TRadioGroup) then
(controls[i] as TRadioGroup).Enabled := enable;
if (controls[i] is TDateTimePicker) then
(controls[i] as TDateTimePicker).Enabled := enable;
end;
咋就不起作用呢????????