"prasad rao" <[email protected]> wrote
HelloI changed the code as follows.But still the callback function
is not
working.
The he() is working well but clicking on the frame has no result.
class app:
def __init__(self,root):
frame=Frame(root)
frame.bind("<Button-1>", callback)
Should this not be self.callback?
def callback(self,event):
print "clicked at", event.x, event.y
This looks like a method? Although the indentation is messed up
in the mail so I can't be sure.
root=Tk()
xx=app(root)
root.mainloop()
hello! there
hello! there
HTH
Alan G
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor