[pygtk] shrink window to minimum size when some child widgets are hidden

Giuseppe Penone giuspen at gmail.com
Mon May 21 00:55:21 WST 2012


No, this is already the default behaviour.
I found the best solution (so far) is to call

window.resize(1,1)

after hiding widgets that require the window to shrink.
This way the window will be shrunk to minimum.

Cheers,
Giuseppe.



On Sun, May 20, 2012 at 6:51 PM, Tom Cato Amundsen <tca at gnu.org> wrote:

> gtk.Window.set_resizable(True) ???
>
> Tom Cato
>
> 2012/5/20 Giuseppe Penone <giuspen at gmail.com>
>
>> Hi,
>> It happens to me many times that after hiding some widgets in the window,
>> the window keeps the original size
>> leaving part of the window with just window background (gray) visible.
>> I'm searching for a solution, but had no luck so far.
>> Does anybody know how to behave to have the window to shrink to minimum
>> size given the actual displayed widgets?
>>
>>
>> _______________________________________________
>> pygtk mailing list   pygtk at daa.com.au
>> http://www.daa.com.au/mailman/listinfo/pygtk
>> Read the PyGTK FAQ: http://faq.pygtk.org/
>>
>
>
>
> --
> Tom Cato Amundsen <tca at gnu.org>                 http://www.solfege.org/
> GNU Solfege - free ear training    http://www.gnu.org/software/solfege/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.daa.com.au/pipermail/pygtk/attachments/20120520/f11a7eb8/attachment.html>


More information about the pygtk mailing list