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

How do i undock controls set in design and redock them as a tabbed group during execution.

Thread ID:





10562 Feb 5,2004 04:30 PM UTC Feb 11,2004 01:41 PM UTC WinForms 5
Tags: Tools
Asked On February 5, 2004 04:30 PM UTC

I have the Controls in a tabbed group at the bottom of the parent. If I use I am trying _DockingManager.SetEnableDocking(Control1,false); _DockingManager.SetEnableDocking(Control2,false); Syncfusion.Windows.Forms.Tools.DockHost dhost = new DockHost(_DockingManager,Control1); dhost.Controls.Add(Control2); _DockingManager.DockControl(dhost,this,Syncfusion.Windows.Forms.Tools.DockingStyle.Bottom,Control1.Height); _DockingManager.SetDockVisibility(Control1,true); _DockingManager.SetDockVisibility(Control2,true); however they do not appear in the same group, but stacked from the bottm up. Also after this if I call _DockingManager.GetDockVisibility(Control2); i get An unhandled exception of type ''System.NullReferenceException'' occurred in syncfusion.tools.dll

Administrator [Syncfusion]
Replied On February 5, 2004 05:54 PM UTC

Hi Vinod, Please refer to the sample code attached. I have undocked the docking windows from their design-time positions and have docked them as a tabbed group at the bottom at runtime. Click the ''Dock as Tabbed Group'' MainMenu item to trigger this. In response to the menu item click event, I do the following : this.dockingManager1.DockControl(this.panel1, this, DockingStyle.Bottom, 120); this.dockingManager1.DockControl(this.panel2, this.panel1, DockingStyle.Tabbed, 120); Note that the second control is docked to the first control in Tabbed DockingStyle, and not to the main form as it is in the case of the first control. There is also a GetDockVisibility menu item and you could click that to get the Visibility status of the controls at any time. In your code above, make the following changes, and it might work fine. _DockingManager.DockControl(dhost,this.Control1,Syncfusion.Windows.Forms.Tools.DockingStyle.Tabbed,Control1.Height); Please let me know if you need any additional information. Thanks for considering Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Administrator [Syncfusion]
Replied On February 10, 2004 07:51 PM UTC

Thanks Guru, That worked perfect. One last question. If I need to dock two controls to the left side but i want one to occupy the top half and the second control to occupy the space below that(lower half). But I need both to be docked on the left side. How do I accomplsh that using DockingStyle.Left. Do I use the Dock size? Thanks V

Administrator [Syncfusion]
Replied On February 10, 2004 09:01 PM UTC

Hi Vinod, Thanks for the update. You could dock two controls as per your specifications by using this code below : this.dockingManager1.DockControl(this.panel1, this, DockingStyle.Left, 150); this.dockingManager1.DockControl(this.listBox1, this.panel1, DockingStyle.Bottom, 150); Assume that panel1 and listBox1 are two controls that you wish to dock. A complete sample illustrating this is attached here. Please refer to the sample and let me know if you need any additional information. Regards, Guru Patwal Syncfusion, Inc.

Administrator [Syncfusion]
Replied On February 11, 2004 12:19 PM UTC

Thanks Guru for the quick turn arround. It works exactly as i need it. Thanks again Vinod

Administrator [Syncfusion]
Replied On February 11, 2004 01:41 PM UTC

Hi Vinod, In future please address all your technical support related questions through Direct Trac as far as possible. We appreciate your cooperation, and thanks for choosing Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon