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



How are you using the function gtk_widget_hide?

Rather, how are you showing the widgets? I think if you are using
gtk_widget_showall() on the vbox, it will show all the children as well,
which would explain why your use of gtk_widget_hide()  didn't work. You
might want to try showing the component widgets separately, then when you
hide the widget in question it should disappear (and the vbox/main window
resize), but not be distroyed. I believe if you destroy a widget and then
try to access it again it does not get reinstantiated, i.e., once it's gone,
it's GONE.  So if you plan to reuse the widget, it would be better to just
hide it.

Hopefully this helps.
Miranda
/------------------------------------------------------------------------\
| Miranda Hawarden-Ogata             Email: hawarden@irtf.ifa.hawaii.edu |
| NASA IRTF, Institute of Astronomy  Phone: (808) 974-4206               |
| 1175 Manono St., Bldg 393            Fax: (808) 974-4207               |
| Hilo, HI 96720                                                         |
\------------------------------------------------------------------------/

-----Original Message-----
From: Federico Mena Quintero <federico@redhat.com>
To: gtk-list@redhat.com <gtk-list@redhat.com>
Date: Thursday, September 30, 1999 8:43 AM
Subject: [gtk-list] Re: packing/unpacking of boxes AND colors -> segment
violation


>>  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
>
>--
>To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
>
>



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