Is there a way to detect when the mouse is clicked on a Tkinter canvas in python, only using modules which are downloaded with the python package?
Asked
Active
Viewed 9,397 times
1 Answers
3
I guess a possible answer would be
root = Tk()
canvas= Canvas(root, width=100, height=100)
canvas.bind("<Key>", key)
canvas.bind("<Button-1>", callback)
canvas.pack()
Where key and callback are functions you have to define yourself. From How to bind a click event to a Canvas in Tkinter?

Astrom
- 767
- 5
- 20