Answers for "how to get the xy coords for the mouse tkinter"

1

tracking mouse position tkinter python

import Tkinter as tk
root = tk.Tk()

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

root.bind('<Motion>', motion)
root.mainloop()
Posted by: Guest on July-03-2020

Code answers related to "how to get the xy coords for the mouse tkinter"

Python Answers by Framework

Browse Popular Code Answers by Language