fa201/PlotView

Update of status bar

Closed this issue · 0 comments

fa201 commented

Use F.LUNDH class p 55 ?
"this method calls the update_idletasks method, to make sure pending draw operations (like the status bar
update) are carried out immediately."

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()

"At the cost of a somewhat awkward call to the frame widget's constructor, we've created a new kind of
custom widget that can be treated as any other widget. You can create and display the status bar using the usual widget syntax:"

status = StatusBar(root)
status.pack(side=BOTTOM, fill=X)