On 03/07/2010 04:00 PM, Cornelius Kölbel wrote: > Hi list, > > I got a treeview with multiselect. > I created a context menu for this treeview > > I connected GtkWidget.buttong-press-event to > on_userTreeview_button_press_event via glade. > > def on_userTreeview_button_press_event(self, widget, event): > if event.button==3: > self.popupUserMenu.popup(None, None, None, event.button, event.time) > > > But when I select several entries and hit the right mouse button, I > loose all selections and only the entry beneath is selected. So i > suspect that my connect is somehow "late", after the default (selecting) > acted on the treeview or that I need to delete the event, so that the > default action does not take place. > > Could you point me to the right direction?
Return True in the event handler, as explained here: http://www.pygtk.org/docs/pygtk/class-gtkwidget.html#signal-gtkwidget--button-press-event http://www.daa.com.au/pipermail/pygtk/2005-June/010465.html joe _______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
