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/... Sent from the Main discussion list for the graph-tool project mailing list archive at Nabble.com.