[Tutor] events and popup menus

Alan Gauld alan.gauld at btinternet.com
Wed May 2 02:31:08 CEST 2012


On 01/05/12 21:59, Chris Hare wrote:
> ... what I can't figure out is how to detect in the popup menu code
 > which image fired the event


>   def do_popup(self,event):


The event argument has various attributes. For a mouse click it should 
include the screen coordinates. You can use those to determine which 
widget was being clicked.

HTH

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/



More information about the Tutor mailing list