oval

Diez B. Roggisch deets at nospam.web.de
Sun Dec 4 10:18:14 EST 2005


>>
>>What you want instead is something like
>>
>>if event.source == a:
>>    ...
>>
>>Please note that I don't know what event actually looks like in Tkinter,
>>so check the docs what actually gets passed to you.
> 
> 
> got AttributeError: Event instance has no attribute 'source'

As I said: I don'k _know_ how event actually looks like,a s I'm not a 
Tkinter-expert, but I've had plenty of projects involving other 
GUI-Toolkits, which work all the same in this manner. After all the 
whole purposs of the event parameter is to inform you about the cause 
for that event - in this case the pressing of a MB on a specific canvas 
element.

But if you'd take it on you to consult the documentation as I asked you 
to do, I'm pretty sure you find the proper attribute.


Regards,

Diez



More information about the Python-list mailing list