There are times when I need to resize a window to something smaller than what I allow the user to resize. For example, displaying a Window of configuration information where a separate prefs window is not a fit design-wise. Normally, the app is limited to the smallest size of the main window’s content, But, for the prefs, I resize to 600x500. To do this, I set the window’s minwidth and minheight to 600 and 500 respectively, call UpdateNow, and then set the new width and height. This works properly on Mac OS and Windows, but fails on Linux.
While you may not need to resize a Linux window for the same reason, if you do need to reset your min values to do this, you won’t be able to do so.
Okay - so caught by the Me versus Self differences again. But … what turned me on to the problem in the first place is that in a full app, I’m calling the window by name, not as Me or Self (WAdvanced.MinWidth, WAdvanced.Width, etc).
Okay, you’ve got me stumped. What’s different between the version in my report and this one? I thought that it was Self. vs. Me, but I used Self in the original version and I call the window by name in my real app. What’s the “Small modification”?
Actually, it is a bug. I tried to manipulate the window to make it works. If you try to make the window smaller from its minimum size, it won’t works. You can see in the project file, window size > minimum size. That’s the key.
Thats why its called “minimum size”
You cant set the value to lower than the minimum
But altering the size from a second window seems fine as well using a fully qualified name
I put an example on the report that does just that and works fine on my Mint 18.1 32 bit Cinnamon VM
This is not all true on linux world. The behavior depends on Window Manager. i3WM, and probably other tiling WM, completely ignore window geometry. So, I can resize any windows. But normally, you can’t resize a Gtk window to smaller than its minimum size. As long as we can modify minimum size, we can resize the window. How can we modify the minimum size when the window is already shown, that’s the issue.
Lets just say that its not a normal expectation from the Xojo side of the world to expect setting the value less than the minimum should work
It wouldn’t even surprise me if the framework enforced “minimum” as “minimum” regardless of what the window manager permitted by ignoring geometry
Makes it kind of pointless to have a minimum and then say “oh but you can set it lower than that” … so its NOT the minimum
[quote=349168:@Norman Palardy]Lets just say that its not a normal expectation from the Xojo side of the world to expect setting the value less than the minimum should work
It wouldn’t even surprise me if the framework enforced “minimum” as “minimum” regardless of what the window manager permitted by ignoring geometry
Makes it kind of pointless to have a minimum and then say “oh but you can set it lower than that” … so its NOT the minimum[/quote]
Just to add data, you can do it on Mac. The window will behave until you go and attempt to resize the window, it will immediately jump to the minimum size.
My reasoning was described in the original post - the app does not lend itself to multiple windows, so I use the same window and resize it for the preferences panel.
[quote=349168:@Norman Palardy]Lets just say that its not a normal expectation from the Xojo side of the world to expect setting the value less than the minimum should work
It wouldn’t even surprise me if the framework enforced “minimum” as “minimum” regardless of what the window manager permitted by ignoring geometry
Makes it kind of pointless to have a minimum and then say “oh but you can set it lower than that” … so its NOT the minimum[/quote]
But - you’re missing the simple fact that I reset the min values before I resize the window.
By your logic, Xcode, JavaFX/Swing, Visual Studio, and dozens of other development environment are also doing it wrong by allowing the developer to change the minimums at run time and resize the window. Also, if your logic is valid, then it should not work in Xojo on Windows or Mac OS.