'How to make a canvas created image follow the mouse pointer?
In tkinter, python, I'm creating a 'game' which involves an image created by the canvas to follow the mouse pointer. Here's what I've tried:
def move(event):
x = event.x
y = event.y
canvas.move(example, x, y)
canvas.tag_bind(example, "<Motion>", move)
As you can see, I binded the mouse cursor so that when any motion is detected, the example would move to that location. But for some reason, it goes off on its on journey. I'd appreciate some help, so thanks for your time :)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
