ToolWindow initial dock style

Docking/MDI for Windows Forms Forum

Posted 19 years ago by Roger Rong
Avatar
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.


Roger

Comments (2)

Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
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
Avatar
Thanks for your quick response. The DockTo method works.

Roger
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.