📜  跟踪鼠标位置 tkinter python 代码示例

📅  最后修改于: 2022-03-11 14:45:29.889000             🧑  作者: Mango

代码示例1
import Tkinter as tk
root = tk.Tk()

def motion(event):
    x, y = event.x, event.y
    print('{}, {}'.format(x, y))

root.bind('', motion)
root.mainloop()