[Gambas-user] Problem resizing forms.

Rob Kudla sourceforge-raindog2 at ...94...
Sun Apr 9 21:43:13 CEST 2006


On Sat April 8 2006 21:25, GuruLounge - MailLists wrote:
> 2) The resize event is designed to keep the form from being
> larger than is necessary.  So on the MAXIMIZE event this works
> fine, only making the form large enough to show all the
> controls but no larger -- in Gnome. But in fluxbox the height
> property doesn't seem to get managed right and it fills the
> screen from top to bottom.

Unfortunately, if you don't want the user to be able to fill the 
screen (top to bottom, left to right, or both) with your app, 
you need to remove the maximize button.  Resizing the window 
during a resize event caused by the user maximizing the window 
will have different and unpredictable results from WM to WM, as 
you've already discovered.  You may be able to check 
Window.State and set it to Window.Normal if it's not there 
already, but that may look ugly to the user depending again on 
which WM they use.

I don't know if it's possible to disable the maximize button in a 
window manager without disabling all resizing, but that's what 
you're up against.  It might be helpful if Gambas exposed the 
maximum and minimum window size hints Qt provides (the QWidget 
methods setMaximumHeight, setMaximumSize, setMaximumWidth, 
setMinimumHeight, setMinimumSize, setMinimumWidth, plus the 
corresponding properties), since I've run into similar issues 
with windows I wanted to prevent the user from making too small.

Rob




More information about the User mailing list