Renamed return value from Read call from button to event... EVERYWHERE

This commit is contained in:
MikeTheWatchGuy 2018-10-15 16:07:23 -04:00
parent 43526e0182
commit c79a8772cc
86 changed files with 7992 additions and 12709 deletions

View file

@ -37,13 +37,13 @@ def TableSimulation():
window = sg.Window('Table', return_keyboard_events=True, grab_anywhere=False).Layout(layout)
while True:
button, values = window.Read()
event, values = window.Read()
# --- Process buttons --- #
if button is None or button == 'Exit':
if event is None or event == 'Exit':
break
elif button == 'About...':
elif event == 'About...':
sg.Popup('Demo of table capabilities')
elif button == 'Open':
elif event == 'Open':
filename = sg.PopupGetFile('filename to open', no_window=True, file_types=(("CSV Files","*.csv"),))
# --- populate table with file contents --- #
if filename is not None: