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

@ -43,19 +43,19 @@ def TestMenus():
# ------ Loop & Process button menu choices ------ #
while True:
button, values = window.Read()
if button is None or button == 'Exit':
event, values = window.Read()
if event is None or event == 'Exit':
return
print('Button = ', button)
print('Event = ', event)
# ------ Process menu choices ------ #
if button == 'About...':
window.Hide()
if event == 'About...':
# window.Hide()
sg.Popup('About this program','Version 1.0', 'PySimpleGUI rocks...', grab_anywhere=True)
window.UnHide()
elif button == 'Open':
# window.UnHide()
elif event == 'Open':
filename = sg.PopupGetFile('file to open', no_window=True)
print(filename)
elif button == 'Properties':
elif event == 'Properties':
SecondForm()
TestMenus()