Re: [gtk-list] hiding things and resizing...

On Fri, 27 Feb 1998, Leeman Strout wrote:

> Me again... *smirk* smack me if I get too loud  ;)
> Same application, I want a portion of the window (some option buttons) to
> be shown only when the user wants them.  Using widget_hide() works just
> fine, except that I don't want the widgets left in the window resizing to
> fit the window.  What I want is for the window to resize to fit the
> widgets.  (unhiding the options does re-inflate the window, the window
> just doesn't auto-deflate)

i would suggest something like an extra NO_WINDOW container
(e.g. GtkSpaceBox ;) that will always request the size of its child, no
matter whether it is visible or not.
hm, come too think about it i belive i could hack that up pretty quick,
it should be a pretty small container derived from GtkBin that needs to
overload the size_request, size_allocate, map, unmap and expose handlers...
what do people think?

[owen, what leeman asks for is the current (visible!) behaviour if you force
unrealize a widget. (which would be bad since currently gtk_widget_unrealize
leaves GTK_MAPPED set on a widget that doesn't have a window anymore.)
do we have any possibility to prevent (preserve??) this visible behaviour,
without enforcing the invariants on gtk_widget_unrealize (which in turn
would change its behaviour)?]

> Leeman


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]