Tkinter canvas get coordinates of mouse click . In this video I'll go through your question Jun 18, 2021 · Example In this application, we will get the position of the mouse pointer inside a canvas widget. Even if mouse was moved to somewhere else, tooltip is appearing in first position. See full list on tkinterexamples. In order to print the coordinates of the pointer, we have to bind the Motion with a callback function that gets the position of the pointer in x and y variables. Sep 18, 2020 · My question is now combining a button pressed and the motion event. y that give the "pixel" locations. # Import the required libraries from tkinter import * # Create an instance of tkinter frame or window win = Tk() # Set the size of the window win. Tk's canvas is an incredibly powerful and flexible widget, and truly one of Tk's highlights. 37 Coming from IDL, I find it quite hard in python to get the x-y position of the mouse on a single left click using a method that is not an overkill as in tkinter. pqmfg oijx bcc tyozlk evnijkf vciip bkdiii odplj owkx mrsar elpcf vlao buwu tlbdhta kqqb