Merge pull request #6350 from PySimpleGUI/Dev-latest

Moved update animation call to after check for window closed. Was get…
This commit is contained in:
PySimpleGUI 2023-04-22 10:13:50 -04:00 committed by GitHub
commit fe7fbcbc44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -11,7 +11,7 @@
Displays the values dictionary entry for each element
And more!
Copyright 2021, 2022 PySimpleGUI
Copyright 2021, 2022, 2023 PySimpleGUI
"""
import PySimpleGUI as sg
@ -99,7 +99,6 @@ def main():
while True:
event, values = window.read(timeout=100)
# keep an animation running so show things are happening
window['-GIF-IMAGE-'].update_animation(sg.DEFAULT_BASE64_LOADING_GIF, time_between_frames=100)
if event not in (sg.TIMEOUT_EVENT, sg.WIN_CLOSED):
print('============ Event = ', event, ' ==============')
print('-------- Values Dictionary (key=value) --------')
@ -108,7 +107,9 @@ def main():
if event in (None, 'Exit'):
print("[LOG] Clicked Exit!")
break
elif event == 'About':
window['-GIF-IMAGE-'].update_animation(sg.DEFAULT_BASE64_LOADING_GIF, time_between_frames=100)
if event == 'About':
print("[LOG] Clicked About!")
sg.popup('PySimpleGUI Demo All Elements',
'Right click anywhere to see right click menu',