Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6798133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:41:36+00:00 2026-05-26T18:41:36+00:00

from Tkinter import * class StatusBar(Frame): def __init__(self, master): Frame.__init__(self, master) self.label = Label(self,

  • 0
from Tkinter import *
class StatusBar(Frame):   
    def __init__(self, master):
        Frame.__init__(self, master)
        self.label = Label(self, bd=1, relief=SUNKEN, anchor=W)
        self.label.pack(fill=X)        
    def set(self, format, *args):
        self.label.config(text=format % args)
        self.label.update_idletasks()
    def clear(self):
        self.label.config(text="")
        self.label.update_idletasks()
root = Tk()
root.update()
d =StatusBar(root)

d.pack()
mainloop()

Hi Friend.This is my code for Status bar.Even though i didn’t get any error or warning. I had failed to obtain the status bar. But my Widget is getting opened with empty in it.Can any one please help me in this aspect.

Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:41:37+00:00Added an answer on May 26, 2026 at 6:41 pm

    It’s there; it’s just very small because none of the widgets requested much space.
    If you put some text in the Label, or gave root a geometry, it would be easier to see:

    import Tkinter as tk
    class StatusBar(tk.Frame):   
        def __init__(self, master):
            tk.Frame.__init__(self, master)
            self.variable=tk.StringVar()        
            self.label=tk.Label(self, bd=1, relief=tk.SUNKEN, anchor=tk.W,
                               textvariable=self.variable,
                               font=('arial',16,'normal'))
            self.variable.set('Status Bar')
            self.label.pack(fill=tk.X)        
            self.pack()
    
    root=tk.Tk()
    d=StatusBar(root)
    root.geometry('300x100')
    root.mainloop()
    

    By the way, to allow the text inside the label to change, use a tk.StringVar.
    Calling self.variable.set(...) will change the label’s text. And to clear it just call self.variable.set('').

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

from TKinter import * class Ui(Frame): def __init__(self) Frame.__init__(self, None) self.grid() bquit=Button(self, text=Quit, command=self.quit_pressed)
here is some code: from Tkinter import * class Main(object): def __init__(self): self.console =
from tkinter import * app=Tk() app.title( BRAIN SYNCRONIZATION SOFTWARE ) e1=Entry(app).pack() t1=Text(app).pack() def InputFun():
from Tkinter import * master = Tk() listbox = Listbox(master) listbox.pack() listbox.insert(END, a list
from Tkinter import * app = Tk() text_field = Entry(app) text_field.pack() app.mainloop() I want
I've created this simple GUI: from tkinter import * root = Tk() def grabText(event):
I made an MP3 player with pygame code: from Tkinter import * import pygame
from Tkinter import * import socket, sys, os import tkMessageBox root = Tk() root.title(File
from Tkinter import * import socket, sys from PIL import Image, ImageTk root =
from Tkinter import * root = Tk() root.title(Whois Tool) text = Text() text1 =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.