测试一下 procedure TForm1.Button1Click(Sender: TObject); var i:integer; begin for i:=0 to 500 do begin with TEdit.Create(self) do begin parent:=self; width:=30; height:=30; text:=inttostr(i); left:=i*30+2; top:=i*30+2; name:=Format('Edit%d',[i]); end; end; end;
procedure TForm1.Button1Click(Sender: TObject);
var i:integer;
begin
for i:=0 to 500 do
begin
with TEdit.Create(self) do
begin
parent:=self;
width:=30;
height:=30;
text:=inttostr(i);
left:=i*30+2;
top:=i*30+2;
name:=Format('Edit%d',[i]);
end;
end;
end;