from tkinter.ttk import *
import time
root= Tk()
root.title("THis is our other lessons")
root.geometry("600x400")
prog=Progressbar(orient=HORIZONTAL,length=100,mode='determinate')
def bar():
for i in range(1,100,1):
prog['value']=i
root.update_idletasks()
root.after(2000,root.destroy)
prog.pack()
butt=Button(text="Start",command= bar())
butt.pack()
root.mainloop()
I tried this method to run the progress bar but it did not worked with time.sleep
, so I tried after
method but the output directly reaches to end.