removing widgets (was Re: Unidentified subject!)

It is quite possible to do this with gtk_container_remove().  Note
however by default the widget will be destroyed when you remove it because
its reference count will reach zero.

To get around this problem, call gtk_widget_ref() on the widget before
removing it so it will have a non zero reference count after being
removed.  If you do this, you must remember to unref the widget at a later
point.  I have a bit of code which does this in gnorpm (the
rpmpackagelist.c file).



On Thu, 23 Sep 1999 wrote:

> Subject: Hiding widgets without destroying them question
> hi,
> I have some gtk related questions about a gnome app I am working on.
> Is it possible to have a clist widget (or any widget) dissappear from it's container, put something else in that container, then put the clist back into that container at a later stage? Is it possible to access the row data of this widget while it is 'hidden'?
> The gtk tutorial is good for displaying widgets but not removing them!
> I have browsed the gtk header files and seen commands like gtk_widget_hide, but I'm not sure if this does what I want to do. I've tried experimenting with the different commands but I can't seem to get the behaviour I want.
> Is there an app around that does this sort of thing from which I can examine the code?
> ta,
> wayne.
> -- 
> To unsubscribe: mail with "unsubscribe"
> as the Subject.

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