()
| 15 | """ |
| 16 | |
| 17 | def main(): |
| 18 | |
| 19 | layout = [ [sg.Text('StatusBar Demo', font='ANY 15')], |
| 20 | [sg.Text('This window has a status bar that is at the bottom of the window')], |
| 21 | [sg.Text('The key to getting your bar to stay at the bottom of the window when')], |
| 22 | [sg.Text('the window is resizeed is to insert a line of text (or some other element)')], |
| 23 | [sg.Text('that is configured to expand. ')], |
| 24 | [sg.Text('This is accomplished by calling the "expand" method')], |
| 25 | [sg.Text('')], |
| 26 | [sg.Button('Ok'), sg.B('Quit')], |
| 27 | [sg.Text(key='-EXPAND-', font='ANY 1', pad=(0,0))], # thin row (font size 1) that expands and keeps bar at the bottom |
| 28 | [sg.StatusBar('This is the statusbar')]] |
| 29 | |
| 30 | |
| 31 | window = sg.Window('Vertical Layout Example', layout, resizable=True, finalize=True) |
| 32 | |
| 33 | window['-EXPAND-'].expand(True, True, True) # needed to make the window expand in a way that will cause status to be at the bottom |
| 34 | |
| 35 | while True: |
| 36 | event, values = window.read() |
| 37 | if event in (sg.WINDOW_CLOSED, 'Quit'): # if user closes window or clicks Quit |
| 38 | break |
| 39 | |
| 40 | if __name__ == '__main__': |
| 41 | main() |
no test coverage detected