Re: [gtkmm] Confused with TabElem
- From: Murray Cumming <murrayc murrayc com>
- To: Daniel Pixley <danpixley cox net>
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: [gtkmm] Confused with TabElem
- Date: Sat, 13 Mar 2004 20:13:01 +0100
On Sat, 2004-03-13 at 02:19, Daniel Pixley wrote:
[snip]
> Gtk::TextView *textview = Gtk::manage(new class Gtk::TextView());
> Gtk::ScrolledWindow *scrolledwindow = Gtk::manage(new class
> Gtk::ScrolledWindow());
> Gtk::Label *label = Gtk::manage(new class Gtk::Label("Test"));
> Gtk::Image *image = Gtk::manage(new class
> Gtk::Image(Gtk::StockID("gtk-close"), Gtk::IconSize(4)));
> Gtk::Button *button = Gtk::manage(new class Gtk::Button());
> Gtk::HBox *hbox = Gtk::manage(new class Gtk::HBox(false, 0));
>
> ... Do stuff to initialize the above widgets,including the following 3
> lines:
>
> button->add(*image); // This is a small close button
> hbox->pack_start(*label, Gtk::PACK_SHRINK, 10);
> hbox->pack_start(*button, Gtk::PACK_SHRINK, 0);
>
> notebook1->pages().push_back(Gtk::Notebook_Helpers::TabElem(*scrolledwindow, *hbox));
> show_all_children();
> notebook1->set_current_page(-1);
> -------------------------------------------------------------------------
> Obviously I am doing this wrong. When I test this code, the tab gets
> added during runtime as expected, but none of the widgets that are
> supposed to be inside of the tab page are there (including the hbox
> containing my label and close button).
Have you tried calling show() on those widgets?
--
Murray Cumming
www.murrayc.com
murrayc murrayc com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]