杜
杜風
Unregistered / Unconfirmed
GUEST, unregistred user!
For j:=0 to FlatPanel4.ControlCount -1 do
Begin
if (FlatPanel4.Controls.ClassName='TLabel') then
begin
showmessage('ok');
FlatPanel4.Controls.Free;
end;
For j:=0 to FlatPanel4.ComponentCount -1 do
Begin
if (FlatPanel4.Components.ClassName='TLabel') then
begin
showmessage('ok');
FlatPanel4.Components.Free;
end;
1。以上兩種方法都不能清除FlatPanel4上動態建立的'TLabel',請教該怎麼寫?
2。Components,Controls有什麼區別?
Begin
if (FlatPanel4.Controls.ClassName='TLabel') then
begin
showmessage('ok');
FlatPanel4.Controls.Free;
end;
For j:=0 to FlatPanel4.ComponentCount -1 do
Begin
if (FlatPanel4.Components.ClassName='TLabel') then
begin
showmessage('ok');
FlatPanel4.Components.Free;
end;
1。以上兩種方法都不能清除FlatPanel4上動態建立的'TLabel',請教該怎麼寫?
2。Components,Controls有什麼區別?