Posted 20 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.
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