procedure TForm1.Button1Click(Sender: TObject);
begin
CreateSomeControls(5, TEdit, Self);
end;
procedure TForm1.CreateSomeControls(Count: Integer; AClass: TControlClass; AOwner: TComponent);
var
I,L: Integer;
begin
L := 10;
for I := 1 to Count do
with AClass.Create(AOwner) do
begin
Parent := Form1;
Visible := True;
Left := L;
Top := 10;
Width := 100;
Height := 20;
Inc(L, Width+10);
end;
end;