1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
procedure TDockeur.DockFenetre(f: TForm);
var ff:tcontrol;
p:tpoint;
begin
if f=nil then exit;
if listedock.Count>0
then begin
f.Position:=poDesigned;
ff:=tcontrol(listedock[listedock.count-1]);
p:=DockSiteDialogue.ClientOrigin;
f.top:=ff.top+p.y+ff.Height;
f.Left:=p.x;
f.ManualDock(docksitedialogue);
if akBottom in f.Anchors then
begin
f.Height:=DockSiteDialogue.Height-5;
end;
end
else begin
f.Left:=0;
f.top:=0;
f.ManualDock(docksitedialogue, nil, albottom);
if akBottom in f.Anchors then
begin
f.Height:=DockSiteDialogue.Height-5;
end;
end;
listedock.Add(f);
f.show;
end; |