Link to home
Start Free TrialLog in
Avatar of zebada
zebada

asked on

ManualDock and alignment problem

I cannot seem to get ManualDock to dock two Forms on a TPanel with the alignment specified.

I issue the following statements:

fConsole.Show;
fDisplay.Show;
fConsole.Manualdock(fMain.pnlDock,nil,alTop);
fDisplay.Manualdock(fMain.pnlDock,nil,alClient);

But the forms end up docking left and right instead of top and bottom.

I'm using Delphi 7 Professional - what am I doing wrong?

Paul
Avatar of zebada
zebada

ASKER

I figured it out already.
I just needed to swap the order, it appears that the first control to be docked is automatically docked with an alignment of alClient - obviously because there are no other controls docked.
So by doing this, it all works how I want:
fConsole.Show;
fDisplay.Show;
fDisplay.Manualdock(fMain.pnlDock,nil,alClient);
fConsole.Manualdock(fMain.pnlDock,nil,alTop);

Regards
Paul


ASKER CERTIFIED SOLUTION
Avatar of Computer101
Computer101
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial