Sub Docking Area inside a Window

Docking/MDI for Windows Forms Forum

The latest build of this product (v2020.1 build 0400) was released 3 months ago, which was before this thread was created.
Posted 2 months ago by John Peterson
Version: 20.1.0400
Avatar

I have a form that is already contained inside a tool window.  It is dockable inside my application.  I want to create a panel on this form and allow other forms to dock inside this panel.  Is there a way to do this?  What would I use?  ToolWindow?  DocumentWindow.

Currently I am attempting this, but when create my toolwindow and set the panel as the child form, the result is that my panel jumps outside my form and docks to the left side of the main application window.

Do I need to use another docking manager on the form itself?  If so, will I be able to dock windows that were created on the main applications docking manager?

Comments (6)

Posted 2 months ago by John Peterson
Avatar

I think I've got it figured out:

- If you have more than one docking manager, you cannot dock toolwindows from docking manager A into docking manager B and vice versa.

- I probably don't need more than one docking manager.

- I should be able to use docking and tool windows to subdivide my window into the regions I want, relieving the necessity for other containers (docking in side of which I cannot get to work...).

Posted 2 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi John,

As you saw, you can have multiple DockManagers (each one targeting a different host container control like a Form/UserControl), but you cannot move docking windows between the two DockManager layouts.  Docking windows are restricted to staying within their own DockManager layout.


Actipro Software Support

Posted 2 months ago by John Peterson
Avatar

The interesting thing is that multiple docking managers can share the same window, and they appear to play nicely with each other, with the exception of not being able to inner dock to each others tool windows.  Would be cool if that was possible, but I understand if it is not.

Is there a way to get a dockable region inside a container on a form?  I want to be able to dock inside a panel or similar on a form, is that possible?

Posted 2 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

You could set the DockManager.HostContainerControl to a blank UserControl you put inside your Form somewhere.  That would make that DockManager work within that UserControl only.


Actipro Software Support

Posted 2 months ago by John Peterson
Avatar

That would work, however, I believe the DockManager's host container control needs to be the main form overall, because it is controlling the docking for all my various forms.  Can you change the host container control on the fly?

Otherwise this is what led me to having two docking managers, the existing one for all the docking, and the 2nd one for my panel.  But because toolwindows from docking manager 1 cannot dock to docking manager 2 tool windows, that doesn't quite work.

Another option would be to keep the 2 docking managers, if it is possible to define a toolwindow on the same form with two different docking managers.  That sounds pretty strange, but maybe it works?

Posted 2 months ago by John Peterson
Avatar

System.ApplicationException: 'No new host container control may be set if there are any tool or document windows associated with the DockManager. Remove all tool and document windows and then change the HostContainerControl property.'

Cannot change the host container control on the fly.

Add Comment

Please log in to a validated account to post comments.