Entry
What's the event name for catching mouse movement without a button pressed?
Jun 1st, 2000 07:38
unknown unknown, John Grayson
From John Grayson's book "Python and Tkinter Programming"
I think Example_6_2.py demostrates this, and the event is also noted on
page 618.
However, this snippet tracks the motion of the mouse without a button
down...
from Tkinter import *
root = Tk()
def motion(event):
print 'Mouse: x=%d, y=%d' % (event.x, event.y)
frame = Frame(root, width=250, height=250)
frame.bind('<Motion>', motion)
frame.pack()
root.mainloop()