Hi,
I want to draw a line on screen so that it gets displayed slowly from left to right.
The line is not drawn point by point after the sleep time interval. The line appears suddenly after the total time elapsed.
Increasing sleep time does not help. I have also tried the "after" command but does not help.
Is there any simple solution ?
I have used following code.
# my code
import time
from tkinter import *
mywindow = Tk()
mywindow.minsize( width=600,height=600)
mycanvas = Canvas(mywindow, width=500, height=500, background = "yellow")
mycanvas.place(x=50, y = 0)
startx = 1
for i in range (1,500,10):
mycanvas.create_line(startx,100,i,100 )
startx = i
time.sleep(0.010)
mc.mainloop()
Mukund Athavale
Mumbai, India