More "Demo Program Catchup" updates. Working through them bit by bit.....

This commit is contained in:
PySimpleGUI 2022-02-22 05:20:03 -05:00
parent 1eb653d910
commit f1e0c7d03f
9 changed files with 87 additions and 57 deletions

View file

@ -1,8 +1,12 @@
#!/usr/bin/env python
import PySimpleGUI as sg
print(sg.version, sg)
'''
Usage of Column Element
How to embed a layout in a layout
Copyright 2022 PySimpleGUI
'''
sg.theme('BlueMono')
@ -14,12 +18,12 @@ col = [[sg.Text('col Row 1', text_color='white', background_color='blue')],
# Window layout
layout = [[sg.Listbox(values=('Listbox Item 1', 'Listbox Item 2', 'Listbox Item 3'),
select_mode=sg.LISTBOX_SELECT_MODE_MULTIPLE, size=(20, 3)),
sg.Col(col, background_color='blue')],
sg.Column(col, background_color='blue')],
[sg.Input('Last input')],
[sg.OK()]]
# Display the window and get values
window = sg.Window('Compact 1-line form with column', layout, margins=(0,0), element_padding=(0,0))
window = sg.Window('Column Element', layout, margins=(0,0), element_padding=(0,0))
event, values = window.read()
sg.popup(event, values, line_width=200)