Can Relative Resizing be Supported with InnerFill?

Docking/MDI for Windows Forms Forum

Posted 14 years ago by Boyd - Automated Software Testing Consultant / Developer, Patterson Consulting, LLC
Avatar
Typically, the size of docked ToolWindows do not change when you resize the container hosting DockManager. This is also how Visual Studio performs, and works well when you have an MDI client area.

I'm working with the new InnerFill feature, and I'd like to make all the ToolWindow sizes relative to the size of the container. I'm creating a form like the Object Browser ToolWindow in Visual Studio, so it serves as a good example.

When you resize the Object Browser, the three panels are all resized as well. Float the Object Browser window and set it up so that the Objects tree and the Members tree are both about half the width of the window. Now change the width of the window and you'll see that these two trees maintain their size as being about 50% of the container width.

My Object Browser ToolWindow has it's own DockManager that is used to create ToolWindows for each of the three panels in Object Browser (Objects, Members, and Description). When I try the above scenario of setting the two tree controls to the same width and then resizing, the tree on the left stays the same size and the one on the right continues to get larger.

Is there any way to make the ToolWindows "grow" and "shrink" with the container?

Comments (4)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Let me know if you think I have this correct. With tool window inner-fill, the centermost tool window container is DockStyle.Fill. Therefore with resizes, it expands while the other tool windows do not.

In a floating window, there is a single dock container parent so everything resizes with that container, which I believe is what you want for the host.

A little background when designing 1.5... we had first looked at somehow adding a top level dock container on the fly to contain all the tool windows in the host however than ended up causing a lot of issues so we ended up implementing it as we have it now.

I'll write down to look into altering the code for the host resize when in inner-fill mode.


Actipro Software Support

Posted 14 years ago by Boyd - Automated Software Testing Consultant / Developer, Patterson Consulting, LLC
Avatar
I think you hear me correctly.

In my particular situation, I create a ToolWindow (twObjects) docked InnerLeft to DockManager. I then create a ToolWindow (twMembers) docked InnerRight to DockManager. Finally, I create a ToolWindow (twDesc) docked InnerBottom to twMembers. This creates a layout similar to the following where twObjects is #1, twMembers is #2 and twDesc is #3:

-------------------
|        |        |
|        |    2   |
|        |        |
|    1   |--------|
|        |        |
|        |    3   |
|        |        |
-------------------
When I change the height of the container, #2 and #3 resize evenly and maintain the same relative height to each other... like the following:

-------------------
|        |        |
|        |    2   |
|        |        |
|        |        |
|        |        |
|    1   |--------|
|        |        |
|        |    3   |
|        |        |
|        |        |
|        |        |
-------------------
In this scenario, it behaves like I'd want it to.

When I change the width of the container, #1 stays the same size and #2 and #3 expand to fill the new width... like the following:

---------------------------------------
|        |                            |
|        |    2                       |
|        |                            |
|        |                            |
|        |                            |
|    1   |----------------------------|
|        |                            |
|        |    3                       |
|        |                            |
|        |                            |
|        |                            |
---------------------------------------
In this last scenario, I don't get the behavior I'd like. I'd prefer that the width of #1 expanded as well so that it maintained the same relative width to toolwindows #2 and #3 ... like the following:

---------------------------------------
|                  |                  |
|                  |    2             |
|                  |                  |
|                  |                  |
|                  |                  |
|    1             |------------------|
|                  |                  |
|                  |    3             |
|                  |                  |
|                  |                  |
|                  |                  |
---------------------------------------
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
You are a true master of ASCII art! :) Yes, it sounds like in that scenario the dock container for the #2,3 tool windows is the DockStyle.Fill one. I've added this to the TODO list.


Actipro Software Support

Posted 14 years ago by Boyd - Automated Software Testing Consultant / Developer, Patterson Consulting, LLC
Avatar
Thanks!
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.