From 580b90fefac978ee6858f223d037aaf4b17d47bd Mon Sep 17 00:00:00 2001 From: MikeTheWatchGuy Date: Tue, 30 Oct 2018 13:16:14 -0400 Subject: [PATCH] Cleaned up --- Demo_Design_Pattern_Persistent_Window.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Demo_Design_Pattern_Persistent_Window.py b/Demo_Design_Pattern_Persistent_Window.py index cf8f3d21..ff108e4b 100644 --- a/Demo_Design_Pattern_Persistent_Window.py +++ b/Demo_Design_Pattern_Persistent_Window.py @@ -10,14 +10,14 @@ else: layout = [[sg.Text('Your typed chars appear here:'), sg.Text('', key='_OUTPUT_') ], [sg.Input(key='_IN_')], - [sg.Button('Show'), sg.Button('Exit')], - ] + [sg.Button('Show'), sg.Button('Exit')]] -window = sg.Window('My new window').Layout(layout) +window = sg.Window('Window Title').Layout(layout) while True: # Event Loop event, values = window.Read() if event is None or event == 'Exit': break - if event == 'Show': # change the text "output" element to be the value of "input" element + if event == 'Show': + # change the "output" element to be the value of "input" element window.FindElement('_OUTPUT_').Update(values['_IN_'])