[pygtk] Auto-shrinking Containers

Dennis Craven arker at rogers.com
Wed Jun 16 21:44:29 WST 2004


On Wed, 2004-06-16 at 07:43, Gustavo J. A. M. Carneiro wrote:

>   Looks like it has been superseded by gtk.Window.set_resizable(),
> documented at
> http://pygtk.org/pygtk2reference/class-gtkwindow.html#method-gtkwindow--set-resizable
> 
>   However, it is not clear from the documentation how to specify the
> auto_shrink=True with the new API.  Perhaps the auto-shrink behaviour
> has become entirely deprecated in gtk...  I always thought auto-shrink
> windows were annoying, anyway, but there are some rare cases when they
> can be useful, like floating toolboxes.  I speculate that you can
> simulate auto-shrink by queueing a size request after hiding some widget
> inside the window.

With the introduction of the gtk.Expander widget in 2.4, it seems almost
necessary. I'm trying to implement a dialog that under certain
conditions, requires the gtk.FileChooser (much like the new "saveas"
dialog in 2.4). When the gtk.Expander expands, all is well and the
dialog expands with it. But when the gtk.Expander is contracted again,
the dialog remains large and there are huge ugly spaces between the
widgets inside it. This is when I want the dialog to 're-shrink'.

Cheers,
~djc



More information about the pygtk mailing list