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.

How do I get two docked panels to stack?

Thread ID:

Created:

Updated:

Platform:

Replies:

53741 Dec 19,2006 02:41 PM Feb 8,2007 05:42 PM Windows Forms 6
loading
Tags: Tools
Scott Swartz
Asked On December 19, 2006 02:41 PM

I create two docking panels and set their "DockingStyle" to "Left". This places them side by side. I'd like to stack them on top of one another, so that the user is presented with two tabs at the bottom. The user can manually do this simply by dragging one of the windows into the appropriate "dock target" or whatever it is called. How do I do this programatically?

In addition, once I have them stacked, how do I programatically set the one I want on top? Once again, this is easy for the user to do (just click on the desired tab), but I'd like to do it programtically in some situations.

thanks in advance

Murugan [Syncfusion]
Replied On December 19, 2006 04:06 PM

Hi Scott,

Thanks for choosing Syncfusion products.

DockingManager.DockControl method is used to dock the control on parent control.

DockingManager.DockControl ( ctrl , parent , style , nSize );

ctrl - Control to be docked
parent - Control that hosts the docked control.
style - Specifies the DockingStyle of the control.

To dock two docked control as stacked, please use the following code snippet
this.dockingManager1.DockControl(this.panel1, this.panel2, Syncfusion.Windows.Forms.Tools.DockingStyle.Tabbed, 100);

To dock a control at Top
this.dockingManager1.DockControl(this.panel1, this.panel2, Syncfusion.Windows.Forms.Tools.DockingStyle.Top , 100);

Please use the above code snippet and let me know if you have any other queries regarding
this.

Regards,
Murugan P.S

Administrator [Syncfusion]
Replied On December 19, 2006 06:01 PM



>Hi Scott,

Thanks for choosing Syncfusion products.

DockingManager.DockControl method is used to dock the control on parent control.

DockingManager.DockControl ( ctrl , parent , style , nSize );

ctrl - Control to be docked
parent - Control that hosts the docked control.
style - Specifies the DockingStyle of the control.

To dock two docked control as stacked, please use the following code snippet
this.dockingManager1.DockControl(this.panel1, this.panel2, Syncfusion.Windows.Forms.Tools.DockingStyle.Tabbed, 100);

To dock a control at Top
this.dockingManager1.DockControl(this.panel1, this.panel2, Syncfusion.Windows.Forms.Tools.DockingStyle.Top , 100);

Please use the above code snippet and let me know if you have any other queries regarding
this.

Regards,
Murugan P.S

Scott Swartz
Replied On December 19, 2006 06:08 PM

The first code snipit worked great.

this.dockingManager1.DockControl(this.panel1, this.panel2, Syncfusion.Windows.Forms.Tools.DockingStyle.Tabbed, 100);

I now have two docked controls with tabs at the bottom. However, the second sippet that sets "DockingStyle.Top" doesn't appear to work. I think that's because I might not have explained what I meant by "top". Basically the first code gives me everything that I want except that this.panel1 is under this.panel2. I would like to change the z-order of this.panel1 so that it's "on top of" this.panel2 as opposed to being docked to the top of the MDI. Another way of saying the same thing is that I want the contents of this.panel1 to be visible to the end user without their needing to click on the tab.

thanks...



To dock a control at Top
this.dockingManager1.DockControl(this.panel1, this.panel2, Syncfusion.Windows.Forms.Tools.DockingStyle.Top , 100);

Murugan [Syncfusion]
Replied On December 19, 2006 06:25 PM

Hi Scott,

please try the code snippet below to dock a control at top of the form

this.dockingManager1.DockControl(this.panel1, this, Syncfusion.Windows.Forms.Tools.DockingStyle.Top , 100);

and let me know if I understand your requirement properly.

Thanks,
Murugan P.S

Administrator [Syncfusion]
Replied On February 8, 2007 05:23 PM

I have 4 controls. How can I specify programatically that control 1 take left half of the screen. Control 2 take top half of the REMAINING screen ( 1/4 screen area ). Control 3 and 4 stay in tabbed fashion in remaining 1/4th of the screen( right bottom 1/4 area )

Thanks,

Administrator [Syncfusion]
Replied On February 8, 2007 05:42 PM

Got it..made a mistake last time around..
dockingManager1.DockControl(frm1,this, DockingStyle.Left, this.Width / 2 );
dockingManager1.DockControl(frm2,this, DockingStyle.Top, this.Height / 2 );
dockingManager1.DockControl(frm3,this, DockingStyle.Top, this.Height/ 2);
dockingManager1.DockControl(frm4,frm3, DockingStyle.Tabbed, this.Height/ 2);

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.

;