class MultiStatusBar(Frame):
def __init__(self, master=None, **kw):
Frame.__init__(self, master, **kw)
def set_label(self, name, text='', side=LEFT, width=0):
if name not in self.labels:
label = Label(self, borderwidth=0, anchor=W)
label.pack(side=side, pady=0, padx=4)
self.labels[name] = label
label = self.labels[name]
label.config(width=width)
def _multistatus_bar(parent):
width, height, x, y = list(map(int, re.split('[x+]', parent.geometry())))
root.geometry("+%d+%d" %(x, y + 150))
root.title("Test multistatus bar")
msb = MultiStatusBar(frame)
msb.set_label("one", "hello")
msb.set_label("two", "world")
msb.pack(side=BOTTOM, fill=X)
msb.set_label("one", "foo")
msb.set_label("two", "bar")
button = Button(root, text="Update status", command=change)
if __name__ == '__main__':
from idlelib.idle_test.htest import run