Removing One Page from GtkNotebook



Hello All,

In my GTK+ application, I am having a GtkNotebook.  I am adding one
page, with a GtkScrolledWindow as a child, and a GtkHBox as a label.
I remove this page from GtkNotebook.  My question is when I remove
this page from GtkNotebook, are the child widgets destroyed?

Here is a sample code snippet.

GtkWidget* notebook = gtk_notebook_new();     
GtkWidget* scroll = gtk_scrolled_window_new(NULL, NULL);
GtkWidget* hbox = gtk_hbox_new(FALSE, 0);                  
gint idx =  gtk_notebook_append_page ( GTK_NOTEBOOK(notebook),
                                         scroll,
                                         hbox);
gtk_notebook_remove_page( GTK_NOTEBOOK(notebook), idx);

// After the above sequence of operations, is the below line
// valid.  Are 'scroll' and 'hbox' still valid?  Or are they
// destroyed by 'gtk_notebook_remove_page'?

gint idx =  gtk_notebook_append_page ( GTK_NOTEBOOK(notebook),
                                         scroll,
                                         hbox);

Rgds,
anna


-- 

Open Movie: Not only will the project be realized with Open
Source/Free Software, but also the resulting movie will be published
under an open public license. This makes it an exciting premiere as
first ever "Open Movie" project!  [ http://orange.blender.org ]



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