Re: [gtkmm] Widgets within Notebooks



Thx for your help.... show_all_children() is not the problem

Show the code that's not working.

Here is the major code:



void ConstraintGui::showGui()
{
  std::cout << "START ConstraintGui::showGui()" << std::endl;

  // Add Tree Browser to VBoxLeft
  // m_TreeBrowserBox is already created by my constructor. is there a function to test if it is valid?
  // More widgets for VBoxLeft will come ...
  m_VBoxLeft.pack_start(m_TreeBrowserBox);

  // Add Table to VBoxRight
  // m_TableBox is already created by my constructor. is there a function to test if it is valid?
  // More widgets for VBoxRight will come ...
  m_VBoxRight.pack_start(m_TableBox);

  // Add MainBox to the main window
  add(m_MainBox);

  // Add VBoxLeft and VBoxRight to MainBox
  m_MainBox.pack_start(m_VBoxLeft);
  m_MainBox.pack_start(m_VBoxRight);

  // Add the Notebook to the MainBox, with the Quit button underneath
  m_Notebook.set_border_width(10);
  m_MainBox.pack_start(m_Notebook);
  m_ButtonBox.pack_start(m_Button_Quit, Gtk::PACK_SHRINK);
  m_MainBox.pack_start(m_ButtonBox, Gtk::PACK_SHRINK);
  // Connect Quit-Button to signal handler
  m_Button_Quit.signal_clicked().connect(SigC::slot(*this, &ConstraintGui::on_button_quit));

  // Add MainBox to the Notebook page -> does not work
  m_Notebook.append_page(m_MainBox, "First Window");

  show_all_children();

  std::cout << "END   ConstraintGui::showGui()" << std::endl;
}


Output:

START ConstraintGui::showGui()

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

(guiTest:1783): Gtk-WARNING **: gtkwidget.c:1489: container class `gtkmm__GtkWindow' has no child property named `tab_expand'

(guiTest:1783): Gtk-WARNING **: gtkwidget.c:1489: container class `gtkmm__GtkWindow' has no child property named `tab_fill'

(guiTest:1783): Gtk-WARNING **: gtkwidget.c:1489: container class `gtkmm__GtkWindow' has no child property named `tab_pack'

(guiTest:1783): Gtk-WARNING **: gtkwidget.c:1489: container class `gtkmm__GtkWindow' has no child property named `tab_label'

(guiTest:1783): Gtk-WARNING **: gtkwidget.c:1489: container class `gtkmm__GtkWindow' has no child property named `menu_label'

(guiTest:1783): Gtk-WARNING **: gtkwidget.c:1489: container class `gtkmm__GtkWindow' has no child property named `position'

core dump






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