Creating a Status Bar in a Tkinter GUI – Python GUI using Tkinter

  tkinter

Email

Creating a Status Bar in a Tkinter GUI – Python GUI using Tkinter

Following coding to use the for Status Bar in python application development

from tkinter import  *


def work():
    print("this working ")
    root.geometry("600x600")

def run():
    print("this is run coding")
    root.geometry("200x200")


root = Tk()
root.geometry("600x600")

menu1 = Menu(root)
root.config(menu=menu1)
submenu = Menu(menu1)
menu1.add_cascade(label="File",menu=submenu)
submenu.add_command(label="New Project", command=work)
submenu.add_command(label="Save As", command=run)
submenu.add_command(label="Save")
submenu.add_command(label="Setting")
submenu.add_command(label="Exit")

submenu1 = Menu(menu1)
menu1.add_cascade(label="Exit", menu=submenu)
submenu1.add_cascade(label="New Edit")

#--------------- staus bar ----------#

status = Label(root, text="Runing.......", relief=SUNKEN, anchor=W, bd=1)
status.pack(side=BOTTOM , fill=X)


root.mainloop()

 

 

Spread the Code

Leave a Reply

avatar

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  Subscribe  
Notify of