[gtkmm] Notebook trouble
- From: Daniel Pixley <danpixley cox net>
- To: gtkmm-list <gtkmm-list gnome org>
- Subject: [gtkmm] Notebook trouble
- Date: 16 Mar 2004 20:22:26 -0800
I have added a close button to my Notebook tabs in addition to a label
(like Gedit). Both are added to a hbox, and then passed to the notebook
dynamically using the Helpers class:
notebook1->pages().push_back(Gtk::Notebook_Helpers::TabElem(*scrolledwindow, *hbox));
How do I tell a close button what page to close when it is clicked? I
have tried using page_num() like this:
void window1::on_button1_clicked() // every close button is given this
// signal before being added with
// the Helper class.
{
Glib::signal_switch_page();
gint page = notebook1->page_num(*this);
notebook1->remove_page(page);
}
But this doesn't work I think because '*this' refers to the main window1
object, and not the button. How can I tell the button clicked signal
which page to close?
Thanks,
Dan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]