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,18 +1,22 @@
import PySimpleGUI as sg
layout = [
[sg.Text('Your typed chars appear here:'),
sg.Text(size=(20, 1), key='-OUTPUT-')],
[sg.Input('', key='-IN-')],
[sg.Button('Show'), sg.Button('Exit')]
]
"""
The basic PySimpleGUI design pattern for a persistent window that is
updated using data input from one of the elements.
Copyright 2020 PySimpleGUI.org
"""
layout = [[sg.Text('Your typed chars appear here:'), sg.Text(size=(20, 1), key='-OUTPUT-')],
[sg.Input(key='-IN-')],
[sg.Button('Show'), sg.Button('Exit')]]
window = sg.Window('Window Title', layout)
while True:
event, values = window.read()
print(event, values)
if event in (sg.WIN_CLOSED, 'Exit'):
if event == sg.WIN_CLOSED or event == 'Exit':
break
if event == 'Show':
# change the "output" element to be the value of "input" element