implementing a right-click popup in a treeview
- From: Ferenc Gerlits <fgerlits gmail com>
- To: gtkmm-list gnome org
- Subject: implementing a right-click popup in a treeview
- Date: Thu, 11 Oct 2007 14:12:43 +0200
Hi,
I have a TreeView in which I would like to implement a right-click
context menu. For single selection, this is fine: I connect_notify() to
the signal_button_press_event() signal, and find out which row the user
wants from event->x and event->y.
However, I would like to have this for multiple selection, and I can't
figure out how to do it. The problem is that after my event handler,
the standard event handler is called as well, which selects the row the
user right-clicked on. My event handler gets the correct selection that
was before the right-click, and I can apply the action to that, so it
works as expected, but to the user it looks wrong, because the selection
shown on the screen is now different.
Is there any way to tell the Gtk engine not to call the standard event
handler for right-clicks on this TreeView? I think the normal way would
be to return 'true' from my event handler, but connect_notify() expects
a void method, so I can't do that.
Ferenc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]