jim-on-linux wrote:
> On Tuesday 13 February 2007 18:02, Gigs_ wrote:
>> can someone explain me this code?
>>
>> from Tkinter import *
>>
>> root = Tk()
>>
>> def callback(event):
>> print "clicked at", event.x, event.y
>>
>> frame = Frame(root, width=100, height=100)
>> frame.bind("", callbac
On Tuesday 13 February 2007 18:02, Gigs_ wrote:
> can someone explain me this code?
>
> from Tkinter import *
>
> root = Tk()
>
> def callback(event):
> print "clicked at", event.x, event.y
>
> frame = Frame(root, width=100, height=100)
> frame.bind("", callback)
> frame.pack()
>
> root.mainlo
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 separat
> 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
ev
can someone explain me this code?
from Tkinter import *
root = Tk()
def callback(event):
print "clicked at", event.x, event.y
frame = Frame(root, width=100, height=100)
frame.bind("", callback)
frame.pack()
root.mainloop()
well, my problem is at frame.bind(",Button-1>", callback)
callba