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

How do I get two docked panels to stack?

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

6 Replies

MU Murugan Syncfusion Team December 19, 2006 09:06 PM UTC

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


AD Administrator Syncfusion Team December 19, 2006 11:01 PM UTC



>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


SS Scott Swartz December 19, 2006 11:08 PM UTC

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);


MU Murugan Syncfusion Team December 19, 2006 11:25 PM UTC

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


AD Administrator Syncfusion Team February 8, 2007 10:23 PM UTC

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,


AD Administrator Syncfusion Team February 8, 2007 10:42 PM UTC

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);

Loader.
Live Chat Icon For mobile
Up arrow icon