Dear Tiago,

I am extending the functions of GraphWidget that visualizes the Graph()
object. 

By default, in graph-tool, when right-click on the widget, the self.picked
vertex (closest to the pointer) will be unselected.

However, i want to extend it so that 1) when right-click on the selected
vertex, it popups a menu - let's say A, while 2) right-click on the
background area, it first unselects the selected vertex and then popups
another menu, let's say B.

I know that i have to overwrite the button_press_event(), but at the branch
of event.button == 3, i cannot successfully differentiate the above two
cases. Thanks a lot.



--
View this message in context: 
http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/how-to-popup-different-right-click-menus-in-GraphWidget-when-right-click-on-selected-vertex-and-back-tp4026853.html
Sent from the Main discussion list for the graph-tool project mailing list 
archive at Nabble.com.
_______________________________________________
graph-tool mailing list
[email protected]
https://lists.skewed.de/mailman/listinfo/graph-tool

Reply via email to