[gtkmm] Gtk::Notebook problem



Hi


Is there a way I can use the same widget as the contents for multiple
pages in a Gtk::Notebook?

Example:

I have a Gtk::ScrolledWindow that contains a Gtk::TextView. I create a
Gtk::Notebook and append a page containing the scrolledwindow widget. 
That works fine...
But then I can't call append_page() again with the same scrolledwindow
widget. I get the following error:

Gtk-CRITICAL **: file gtkwidget.c: line 3817 (gtk_widget_set_parent):
assertion `widget->parent == NULL' failed

I want to be able to use the same TextView in multiple tabs (pages), and
change only the contents of the underlying TextBuffer for the TextView.

Please help! The gtkmm documentation, examples and source code 
didn't help me so far...






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