Programmatically Attach ToolWindow to MDI Area

Docking/MDI for Windows Forms Forum

Posted 19 years ago by Boyd - Sr. Software 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 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Actually, just do this:
twToolbox.State = ToolWindowState.TabbedDocument;


Actipro Software Support

Posted 19 years ago by Boyd - Sr. Software Developer, Patterson Consulting, LLC
Avatar
I knew it was something simple I overlooked... thanks!
The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.