WIN_CLOSED bulk update. No more test for event is None, use WIN_CLOSED instead

This commit is contained in:
PySimpleGUI 2020-05-07 06:22:59 -04:00
parent 6174b355a6
commit 0076b461f5
135 changed files with 395 additions and 349 deletions

View file

@ -1,5 +1,10 @@
import PySimpleGUI as sg
event, values = sg.Window('Window Title', [[sg.Text('Enter Something')], [sg.Input(key='-IN-'),],[sg.Button('OK'), sg.Button('Cancel')]]).read(close=True)
sg.popup(event, values)
# Basic Example
layout = [[sg.Text('Please enter your Name, Address, Phone')],
@ -9,7 +14,7 @@ layout = [[sg.Text('Please enter your Name, Address, Phone')],
[sg.Button('Submit'), sg.Button('Cancel')]]
window = sg.Window('Simple Data Entry Window', layout)
event, values = window.read()
event, values = window.read(close=True)
print(event, values['-NAME-'], values['-ADDRESS-'], values['-PHONE-'])
sg.popup('test')
window.close()