Creating a Status Bar in Tkinter GUI
from tkinter import *
def updating():
statusvar.set("Updating...")
status_bar.update()
import time
time.sleep(2)
statusvar.set("Updated")
root = Tk()
root.geometry("1000x600")
root.title("STATUS BAR Creating")
Button(root, text="Update", command=updating).pack(side=TOP)
statusvar = StringVar()
statusvar.set("Ready")
status_bar = Label(root, textvariable=statusvar, relief=SUNKEN, anchor=W)
status_bar.pack(side=BOTTOM, fill=X)
root.mainloop()
Comments
Post a Comment
Write something to CodeWithAbdur!