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 undock controls set in design and redock them as a tabbed group during execution.

Thread ID:

Created:

Updated:

Platform:

Replies:

10562 Feb 5,2004 11:30 AM Feb 11,2004 08:41 AM Windows Forms 5
loading
Tags: Tools
Vinood
Asked On February 5, 2004 11:30 AM

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 12:54 PM

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 02:51 PM

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 04:01 PM

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 07:19 AM

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

Administrator [Syncfusion]
Replied On February 11, 2004 08:41 AM

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.

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.

;