I’ve just filed a feature request in feedback fo an option to allow Window (or any other control that can contain other controls) to have it’s height / width adjusted without adjusting the contained controls that happen to be locked to bottom or right:
Here is the text of the request to explain why such a thing would be useful. Please sign on if you think it would be helpful.
The current system of locking controls to edges of windows is excellent, however it would be even better if there was a method of overriding these constraints in the window editor for a period of time without the need to turn on and off each setting on the controls.
For example take the attached project. Open it in the IDE and select Window1. It is a complex layout for a dialog or sheet window. On the window you can see there are three panels. The top “variables” panel, the middle “filters” panel and a lower “options” panel. In the window editor increasing and decreasing the height shows that the “Filters” panel grows and shrinks, while the top and bottom stay the same size and stick to their respective locations. All of that is fine and as desired.
Consider now that you wish to adjust the design of the window. You decide to increase the size of the listbox in the “Variables” panel. So you do the following:
- Drag the height of the “Variables” panel deeper.
- Drag the “Filters” panel, “Options” panel and buttons lower on the window, so they are not underneath the “Variables” panel.
All good so far. However, now the tricky bit. If you look at Window2 you can see the same window after the above controls are moved. As you can see some controls are now hanging off the bottom of the window. So we need to make the window taller. You select the window and drag its height and rather than getting a larger window that encompasses the controls the “Options” panel gets lower still and the “Filters” panel grows in size. The same thing happens if you enter a new value for the height of the window in the inspector.
In order to solve this problem you end up having to:
- Turn off the lock bottom on all controls that are set that way.
- Adjust the window height
- Turn back on the lock bottom settings that you removed.
The last step can be quite challenging. In my example it was relatively simple as I have a few group boxes and buttons to adjust. However, if the controls weren’t laid out in groups it would be much harder.
What I would like is a method of resizing the window and temporarily telling the system to ignore any lock bottom / lock right settings. For example if I could hold down the options key and drag the window size and it just changed the window size, that would achieve the goal. Preferably I would like a way of doing it via the inspector panel too. For example, enter the new height for the window and pressing Option-Return to change the height of just this control. Equally changing the width would also benefit from the same options.
Equally valid but not as attractive would be an inspector option that allowed the constraints to be turned on and off. I think this would be more obvious to a beginner but somewhat more clunky in use.
I thought for a moment that the “lock position” option was going to allow me to do what I wanted. However, it doesn’t. Locking the position of all control and dragging the window height still changes the location of the controls. Which you would think is a bug.
Finally, this issue doesn’t just apply to Window the height / width, it also applies to any control that contains other controls, such as a group box or canvas. The same lock bottom right applies to the the contained controls and thus would benefit from a temporary way of ignoring the lock properties while resizing their container. In my example “option-dragging” the height of the “Variables” group box would not adjust the height of the Y Variables listbox, even though the list box is locked to the bottom of the group box.