procedure TForm1.Button2Click(Sender: TObject);
const
cc=3;
var sp : TSpeedButton;
i,fila,col:integer;
begin
for i :=0 to 6 do
begin
sp:=TSpeedButton.Create(Panel1);
sp.Parent:=Panel1;
sp.Width:= 100;
sp.Height:= 100;
col:=i mod cc;
fila:= (i-col) div cc;
sp.Left:=100*col+2;
sp.Top:= 100*fila +2;
end
end;
end.