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.
Unfortunately, activation email could not send to your email. Please try again.

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

Thread ID:

Created:

Updated:

Platform:

Replies:

62665 Jun 20,2007 03:30 AM Jun 20,2007 05:21 AM Windows Forms 1
loading
Tags: Tools
Dan Searle
Asked On June 20, 2007 03:30 AM

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.

Dan Searle
Replied On June 20, 2007 05:21 AM

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.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;