Re: [gtk-list] show() vs. show_all()



>What is the difference between calling gtk_widget_show_all() on a say
>top-level window, and using gtk_widget_show() on every widget
>descending from the window?

Hiya, gtk_widget_show_all() is great for simple windows ... but often you have
a mix of hidden and visible widgets. For example, you might have a window
showing an image, with a pair of rulers which are hidden by default, but which
the user can make visible.

The rule I use is that if I'm writing a single widget-building-function which
calls no other widget builders, then I can use gtk_widget_show_all(). In all
other cases I have to use gtk_widget_show(), to avoid messing up the show/hide
state of any sub-widgets.

John
--
John Cupitt, john.cupitt@ng-london.org.uk, +44 (0)171 930 2108
VASARI Lab, The National Gallery, Trafalgar Square, London, WC2N 5DN



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