Did you find the bug in my code? tab_label_box = gtk.EventBox() tab_label = gtk.Label("Some label here") tab_label_box.add(tab_label) tab_label_box.connect('event', on_tab_click, your_page_widget) notebook.append_page(your_page_widget, tab_label_box)
def on_tab_click(self, widget, event, child): if event.type == gtk.gdk.BUTTON_PRESS: n = notebook.page_num(child) # this will automagically switch to whatever page you click on notebook.set_current_page(n) if event.button == 3: menu = create_a_menu() # I still use the ItemFactory menu.popup(None, None, None, event.button, event.time) _______________________________________________ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/