(parent)
| 20 | |
| 21 | |
| 22 | def _multistatus_bar(parent): # htest # |
| 23 | from tkinter import Toplevel, Text |
| 24 | from tkinter.ttk import Frame, Button |
| 25 | top = Toplevel(parent) |
| 26 | x, y = map(int, parent.geometry().split('+')[1:]) |
| 27 | top.geometry("+%d+%d" %(x, y + 175)) |
| 28 | top.title("Test multistatus bar") |
| 29 | |
| 30 | frame = Frame(top) |
| 31 | text = Text(frame, height=5, width=40) |
| 32 | text.pack() |
| 33 | msb = MultiStatusBar(frame) |
| 34 | msb.set_label("one", "hello") |
| 35 | msb.set_label("two", "world") |
| 36 | msb.pack(side='bottom', fill='x') |
| 37 | |
| 38 | def change(): |
| 39 | msb.set_label("one", "foo") |
| 40 | msb.set_label("two", "bar") |
| 41 | |
| 42 | button = Button(top, text="Update status", command=change) |
| 43 | button.pack(side='bottom') |
| 44 | frame.pack() |
| 45 | |
| 46 | |
| 47 | if __name__ == '__main__': |
nothing calls this directly
no test coverage detected
searching dependent graphs…