Re: [gtk-list] Re: packing/unpacking of boxes AND colors -> segment violation



On Thu, 30 Sep 1999, Federico Mena Quintero wrote:

> >  HOWEVER, the vbox that contained the widget doesn't seem to resize back
> >  to its size before the widget was added.  It "remembers" the 100x100 and
> >  displays an ugly, empty, widgetless, 100x100 box.  In Tk I would have
> >  called the packForget() method to unpack/hide the widget quite
> >  independent of whether or not I wanted to actually destroy it (in
> >  general I probably don't) but gtk_widget_hide doesn't seem to do
> >  anything at all.
> 
> Use gtk_window_set_policy() and use TRUE for the auto_shrink argument.
> 
>   Federico

That did it, thanks!  Amazingly, in spite of having not one but two New
Riders books on GTK programming, plus the GTK v1.2 tutorial from the
website, plus the assorted documents in the distribution, I couldn't
find a single place that the gtk_window_set_policy() function was
documented!  I was wondering what it was for, as they used it in several
examples.  With your hint I had a clue where to look in info to figure
out which one the auto_shrink argument WAS:-).

I'll also take the second comment about how to show an object so it's
hideable to heart and see if I can it work out as well.

Just for the record, are there any other/newer/better resources for
learning GTK than what I've found so far?  I'm not too happy with the
books and other documentation as this is just one of many things that
are left unexplained.  gtk info looks complete enough, but as usual
resources like this are useful only when you already have a pretty good
idea where to look...

   rgb

Robert G. Brown	                       http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
Phone: 1-919-660-2567  Fax: 919-660-2525     email:rgb@phy.duke.edu





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