我在unit2中自定义了一个过程,
procedure Tf_newbooks.ClearEdit;
Var
i:Integer;
begin
for i:=0 to self.componentcount-1 do
begin
if self.components[i] is Tedit then
(components[i] as tedit).text:='';
end;
end;
想在其它单元中如unit1中调用,怎么操作呀。
procedure Tf_newbooks.ClearEdit;
Var
i:Integer;
begin
for i:=0 to self.componentcount-1 do
begin
if self.components[i] is Tedit then
(components[i] as tedit).text:='';
end;
end;
想在其它单元中如unit1中调用,怎么操作呀。
uses unit2;
在unit1中調用:
f_newbooks.ClearEdit;
f_newbooks.ClearEdit;
是清空的f_newbooks中的Edit框的内容,不是清空的unit1即调用该过程窗口的edit框的内容。