[pygtk] Auto-shrinking Containers
Gustavo J. A. M. Carneiro
gjc at inescporto.pt
Wed Jun 16 20:43:28 WST 2004
A Qua, 2004-06-16 às 07:55, John Finlay escreveu:
> Gustavo J. A. M. Carneiro wrote:
> >A Ter, 2004-06-15 às 03:00, Dennis Craven escreveu:
> >>Using PyGTK 2.4, I've added a gtk.Expander as the last (bottom) child of
> >>a gtk.VBox. When the Expander expands, all is well. But when the
> >>expander contracts again, I would like the parent VBox and it's parent
> >>gtk.Dialog to shrink down to original size again.
> >>What is the magic combination of settings for a VBox or Dialog that will
> >>make it snap back when the Expander contracts? I'm not having much luck
> >>playing with this.
> > See
> > Looks like pygtk documentation is missing this method...
> It's a deprecated function. I haven't included deprecated methods unless
> they became deprecated in 2.2 or 2.4
OK. You did well. Gosh, I feel old... :-P
Looks like it has been superseded by gtk.Window.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.
Gustavo João Alves Marques Carneiro
<gjc at inescporto.pt> <gustavo at users.sourceforge.net>
The universe is always one step beyond logic.
More information about the pygtk