Programmatically Attach ToolWindow to MDI Area

Docking/MDI for Windows Forms Forum

Posted 15 years ago by Boyd - Automated Software Testing Consultant / Developer, Patterson Consulting, LLC
Avatar
How do you programmatically attach a ToolWindow to the MDI area? I've tried the following code:

ToolWindow twToolbox = new ToolWindow(dockManager, "TOOLBOX", "Toolbox", null, toolboxPane);
twToolbox.DockTo(dockManager, DockOperationType.Attach);
And I get an ApplicationException: The dock operation 'Attach' is not permitted on a target type of 'Manager'

What am I missing? Thanks for the help.

Comments (2)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Actually, just do this:
twToolbox.State = ToolWindowState.TabbedDocument;


Actipro Software Support

Posted 15 years ago by Boyd - Automated Software Testing Consultant / Developer, Patterson Consulting, LLC
Avatar
I knew it was something simple I overlooked... thanks!
The latest build of this product (v2020.1 build 0400) was released 9 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.