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 form

I am using Docking manager to dock the forms in the MDI application. Now druing runtime, I need to remove the form from docking manager and make the form as modal dialog. Then at some point of time, I need to again dock the form which has been made modal dialog. What i did to remove the form from docking manager is, this.dockingManager.SetEnableDocking(form,false); form.ShowInTaskbar = false; form.TopLevel = true; form.Visible = false; form.ShowDialog(); Then to dock it again in the docking manager, form.TopLevel = false; this.dockingManager.DockControl(m_scriptConsoleForm, this, Syncfusion.Windows.Forms.Tools.DockingStyle.Bottom,150); But when i am docking it again the form is not displayed. Kindly let me know is this a bug in docking manager or am i doing something wrong.

7 Replies

AD Administrator Syncfusion Team September 7, 2005 11:28 AM UTC

Sorry to move it back to the docing manager, I used form.TopLevel = false; this.dockingManager.DockControl(form, this, Syncfusion.Windows.Forms.Tools.DockingStyle.Bottom,150); I am doing this in the parent form.


VS Vijayanand S Syncfusion Team September 8, 2005 09:02 AM UTC

Hi Suresh, Please take a look at this test sample and let me know if it meets your requirements. To Dock a form: form.TopLevel = false; form.FormBorderStyle=FormBorderStyle.None; (Missed line) this.dockingManager1.DockControl(form, this, Syncfusion.Windows.Forms.Tools.DockingStyle.Bottom,150); To make the Docking Manager form as Modal dialog form, the following code segment can be used: this.dockingManager1.SetEnableDocking(form,false); form.FormBorderStyle=FormBorderStyle.Sizable; form.Size=new Size(300,300); form.Parent=null; form.ShowInTaskbar = false; form.TopLevel = true; form.Visible = false; form.ShowDialog(); Thanks for your patience. Regards, Vijay


AD Administrator Syncfusion Team September 8, 2005 10:03 AM UTC

Vijay, Thanks for the reply. I am able to make the form which is docked as modaldialog . But I need to again dock the modal dialog to the docking manager without closing the form. When i did this (docking the form which has been displayed as modal dialog) using Context menu item Dock, the form is not displayed correctly. I have attached the sample which shows the problem. DockingManagerForum_6192.zip


VS Vijayanand S Syncfusion Team September 8, 2005 12:12 PM UTC

Hi Suresh, I am afraid that without closing the Modal dialog form we cannot make it a docked window. Once you have displayed the form as Modal Dialog, you have to close the window. So the form must be reinitialised to dock on the main form. Please take a look at this modified sample and let me know if it fulfills your requirement. Regards, Vijay


AD Administrator Syncfusion Team September 8, 2005 01:13 PM UTC

Vijay, No, the sample does not fit our requirement. We need to dock the form without closing it. Is there anyother workarounds for this or is it not possible?


VS Vijayanand S Syncfusion Team September 9, 2005 06:30 AM UTC

Hi Suresh, I have found a workaround for your requirement. In the sample attached , I have shown the form as a normal( Not a modal dialog ) form and then set the Enabled property to False for MDI window( So that Normal form will act as a Modal dialog ). Then, I have set the Enabled property to True in the form Closed event so that when the form has closed, it will change to a Docking window. I hope this resolves your requirement. Please let me know if you have any questions. Thanks for your patience. Regards, Vijay


AD Administrator Syncfusion Team September 9, 2005 07:41 AM UTC

Hi Vijay Thanks. It serves the purpose.

Loader.
Live Chat Icon For mobile
Up arrow icon