Posted 19 years ago
by Roger Rong
![Avatar](https://secure.gravatar.com/avatar/333f0b53b77720df76e9236d1660c4db.jpg?s=64&d=identicon&r=g)
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
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