DocumentWindow: how can I set size?

Docking/MDI for Windows Forms Forum

Posted 13 years ago by Gianni Gardini - Italy
Avatar
Version: 2.0.0.72

I'm working in "Standard Mode":
dockManager.DocumentMdiStyle = DocumentMdiStyle.Standard;
dockManager.DefaultMdiWindowState = FormWindowState.Normal;
When I create a new DocumentWindow, the starting default size is always:
.Size = {Width=292 Height=266}

How can I set a default start size?

I'm trying various methods with no effects.

Test 1 (not working)

DocumentWindow dw = new DocumentWindow(this.dockManager, title, title, image, childControl);
dw.Activate();
dw.SetBounds(dw.Location.X, dw.Location.Y, mySize.Height, mySize.Width);
Test 2 (not working)

dw.Activate();
dw.Height = mySize.Height;
dw.Width = mySize.Width;
Test 3 (not working)

dw.Activate();
dw.Size = mySize;

Comments (2)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi there, you can use the StandardMdiBounds property of the DocumentWindow to control where it is and what size.


Actipro Software Support

Posted 13 years ago by Gianni Gardini - Italy
Avatar
Thanks,
it seems to work.
The latest build of this product (v2018.1 build 0341) was released 6 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.