Posted 21 years ago
by Erbe One

Ok here is the situation,
Dim childSize As Size = Child.Size
Dim childBounds As Rectangle = Child.Bounds
Dim D As DWToolWindow
If CaptionText = Nothing Then CaptionText = Child.Text
D = DockableWindowManager.CreateToolWindow(Child.Name, CaptionText, ImageIndex, Child)
D.DockTo(DockableWindowManager, DockStyle)
D.State = DWToolWindowState.AutoHide
D.PreferredSize = childSize
D.AutoHideSize = childSize
D.UndockedBounds = childBounds
So all the sizes parameters are set correctly.
Now when I run the my app, the toolwindows is hidden and when I click on the caption it displays with the right size. But if I click on the docking pin, the size is set to a predefined width that I can not seam to be able to change even is I set the prefered size property.
But if I set the starting state property to Dockable, it works fine.
Dim childSize As Size = Child.Size
Dim childBounds As Rectangle = Child.Bounds
Dim D As DWToolWindow
If CaptionText = Nothing Then CaptionText = Child.Text
D = DockableWindowManager.CreateToolWindow(Child.Name, CaptionText, ImageIndex, Child)
D.DockTo(DockableWindowManager, DockStyle)
D.State = DWToolWindowState.AutoHide
D.PreferredSize = childSize
D.AutoHideSize = childSize
D.UndockedBounds = childBounds
So all the sizes parameters are set correctly.
Now when I run the my app, the toolwindows is hidden and when I click on the caption it displays with the right size. But if I click on the docking pin, the size is set to a predefined width that I can not seam to be able to change even is I set the prefered size property.
But if I set the starting state property to Dockable, it works fine.