Tkinter: how; newbie
Gigs_
gigs at hi.t-com.hr
Tue Feb 13 19:11:51 EST 2007
Matimus wrote:
>> How the callback function get this two number when it has only one
>> argument (event)?
>
> It has one argument, event, which is an instance of a class that has
> both x and y attributes.
>
>> print "clicked at", event.x, event.y
>
> It doesn't accept the coordinates as separate parameters because every
> event binding uses that same signature, even ones for which
> coordinates might not make any sense. I recommend you look over the
> python tutorial: http://docs.python.org/tut/
>
>
that was fast, thanks
More information about the Python-list
mailing list