procedure TForm1.BitBtn1Click(Sender: TObject);
const
count: integer = 100;
var
i, x, y: integer;
panelList: array of TPanel;
Panel: TPanel;
rect: Trect;
edit: TEdit;
begin
LockWindowUpdate(Handle);
SetLength(panelList, count);
for i := 0 to count - 1do
begin
Panel := TPanel.Create(self);
x := i mod 10 * 40;
y := (i div 10) * 40;
rect := classes.Rect(x, y, x + 30, y + 30);
Panel.BoundsRect := rect;
Panel.Caption := IntToStr(i);
edit := TEdit.Create(self);
rect := classes.Rect(1, 1, 8, 22);
edit.BoundsRect := rect;
edit.Parent := Panel;
edit := TEdit.Create(self);
rect := classes.Rect(10, 1, 18, 22);
edit.BoundsRect := rect;
edit.Parent := Panel;
edit := TEdit.Create(self);
rect := classes.Rect(20, 1, 28, 22);
edit.BoundsRect := rect;
edit.Parent := Panel;
panelList := Panel;
end;
for i := 0 to high(panelList)do
begin
Panel := panelList;
Panel.Parent := self;
end;
LockWindowUpdate(0);
end;