Answers for "tkinter mouse position"

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
0

tkinter mouse loading cursor

def do_something():
 print "starting"
 root.config(cursor="watch")
 root.update()
 time.sleep(5)
 root.config(cursor="")
 print "done"
Posted by: Guest on October-21-2021

Python Answers by Framework

Browse Popular Code Answers by Language