ToolWindow initial dock style

Docking/MDI for Windows Forms Forum

Posted 19 years ago by Roger Rong
Hi there,

When starting a ToolWindow, I would like it be docked to the top of the parent form. But what ever I tried, I could only make it dock to the left and users have to manually drag it to make it dock to the top.

Following is my code:

ToolWindow tw = new ToolWindow (this.dockManager1 , myKey, myTExt, 1, myControl);

tw.Dock = DockStyle.Top ;

tw.Activate ();

It seems that the tw.Dock could not control its initial dock style. I think I may have missed something out.

Appreciate it if anyone could tell me how to make it. Thanks in advance.


Comments (2)

Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Roger,

Yes the Dock property won't do anything. You need to use the DockTo method. That will let you specify exactly what target to dock to and on what side.

Actipro Software Support

Posted 19 years ago by Roger Rong
Thanks for your quick response. The DockTo method works.

The latest build of this product (v24.1.0) was released 4 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.