X
xy_c
Unregistered / Unconfirmed
GUEST, unregistred user!
我用如下语句设置控件的属性但是老不成功,为什么?
for j:=0 to application.ComponentCount -1 do //遍历project中所有的form
if application.Components[j] is Tform then
// showmessage(application.Components[j].Name);
for k:= 0 to application.Components[j].ComponentCount - 1 do //遍历form中的控件
begin
cap:=inifile.ReadString(application.Components[j].Name,application.Components[j].Components[k].name,'');
.... // 判断是否有caption属性
SetPropValue(application.Components[j].Components[k],'Caption', cap);
end;
end;
// end;
for j:=0 to application.ComponentCount -1 do //遍历project中所有的form
if application.Components[j] is Tform then
// showmessage(application.Components[j].Name);
for k:= 0 to application.Components[j].ComponentCount - 1 do //遍历form中的控件
begin
cap:=inifile.ReadString(application.Components[j].Name,application.Components[j].Components[k].name,'');
.... // 判断是否有caption属性
SetPropValue(application.Components[j].Components[k],'Caption', cap);
end;
end;
// end;