I have been trying to learn how move canvas items from google, however the method shown most places doesnt seem to work for me as intended. right now i am just trying to get a ball move from one side of the screen to the other over the period of 1 second
from tkinter import *
root = Tk()
c = Canvas(root, width = 200, height = 100)
c.pack()
ball = c.create_oval(0, 25, 50, 75)
for i in range(25):
c.move(ball, 6, 0)
root.after(40)
root.mainloop()
when run, this seems to move the ball before opening the window, however if i call upon mainloop first, the window opens but the ball doesn't move.
Unsure of how it is meant to be set out but if anyone knows that would be awesome.