We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Docking two windows on the left one on top of the other

I have a form with a docking manager control on it and two panels.

I am setting the docking position of the panels within my InitializeDockingWindows method as follows.

dockingManager.DockControl(panel1, this, DockingStyle.Left, 200);
dockingManager.SetAutoHideMode(panel1, false);
dockingManager.SetDockLabel(panel1, "Panel1");

dockingManager.DockControl(panel2, this, DockingStyle.Left, 200);
dockingManager.SetAutoHideMode(panel2, false);
dockingManager.SetDockLabel(panel2, "Panel2");

What I'm trying to achieve is having the two panels docked on the left with one below the other. (see below)

oooooooooooooooooooooooooo
o o o
o o o
o o o
o A o o
o o o
o o o
o o o
ooooo o
o o o
o o o
o B o o
o o o
o o o
oooooooooooooooooooooooooo

How can I achieve this? Is there some way to place the panels on my form at design time and make this the default docking behaviour or should my code in InitializeDockingWindows be different?

Any advice would be a big help.

1 Reply

DS Dan Searle June 20, 2007 09:21 AM UTC

Found the answer now, I needed to set the parent control ref in the call to dock the second panel to be the first panel.

Loader.
Live Chat Icon For mobile
Up arrow icon