Re: gtk_widget_unparent



On Thu, 21 Mar 2002 15:05:18 -0800, "Norman Black" <stonybrk ix netcom com> wrote:

According to the docs, you are not supposed to use gtk_widget_unparent.

This is what the GTK+1.2 docs say about gtk_widget_unparent:

|gtk_widget_unparent ()
| void        gtk_widget_unparent             (GtkWidget *widget);
|         widget :

That's all there is. Secondary literature tells me it is supposed to be
used in derived widgets. There is nothing fundamental about this statement;
and it won't be there if it weren't supposed to be used at all.


You should probably use gtk_container_remove to remove a widget from a
container widget, unless the contain widget has a specific removal API
call. For example the notebook widget has its own API for removing a
page. Things like the packing boxes do not.

I'll check gtk_container_remove, thinks for the hint, but from the 
wording of the function name I suspect it does pretty much the same as
gtk_notebook_remove_page, i.e. removing and *discarding* the sub-tree, 
leaving the notebook with one page less behind. I want it exactly the
other way round.


Cheers  Peter
-- 
---------------------------------------------------------------------
      Dr. Peter Rottengatter       peter rottengatter de
                                   http://www.rottengatter.de
---------------------------------------------------------------------



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