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

docking to mdi child

hi

I have an mdi parent with a docking manager on it(dockingManager1) and multiple mdi children. I am trying to dock a control to child forms using the following code:

TextBox myText = new TextBox();
myText.Parent = this.ActiveMdiChild;
myText.Show();
this.dockingManager1.DockControl(myText, this.ActiveMdiChild, Syncfusion.Windows.Forms.Tools.DockingStyle.Bottom, 200);

is it not possible to dock controls to mdi children from mdi parent?

Thanks,

1 Reply

JJ Jisha Joy Syncfusion Team September 25, 2007 09:56 AM UTC

Hi Kais,

Thank you for your interest in Syncfusion Products.

When the host control of the DockingManager to a form, then it can be used to dock controls to that form only.

If we want to dock any control to the MDI child from MDI parent then the MDI child object must be assigned as the HostControl of the DockingManager
Here is the code snippet.

this.dockingManager1.HostControl = this.ActiveMdiChild;
this.dockingManager1.DockControl(myText, this.ActiveMdiChild, Syncfusion.Windows.Forms.Tools.DockingStyle.Bottom, 200);


Let me know if you have any questions

Regards,
Jisha

Loader.
Live Chat Icon For mobile
Up arrow icon