Skip to content

Commit fe7fbcb

Browse files
authored
Merge pull request #6350 from PySimpleGUI/Dev-latest
Moved update animation call to after check for window closed. Was get…
2 parents 041c5ba + fb5fdbd commit fe7fbcb

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

DemoPrograms/Demo_All_Elements.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
Displays the values dictionary entry for each element
1212
And more!
1313
14-
Copyright 2021, 2022 PySimpleGUI
14+
Copyright 2021, 2022, 2023 PySimpleGUI
1515
"""
1616

1717
import PySimpleGUI as sg
@@ -94,12 +94,11 @@ def make_window(theme):
9494

9595
def main():
9696
window = make_window(sg.theme())
97-
97+
9898
# This is an Event Loop
9999
while True:
100100
event, values = window.read(timeout=100)
101101
# keep an animation running so show things are happening
102-
window['-GIF-IMAGE-'].update_animation(sg.DEFAULT_BASE64_LOADING_GIF, time_between_frames=100)
103102
if event not in (sg.TIMEOUT_EVENT, sg.WIN_CLOSED):
104103
print('============ Event = ', event, ' ==============')
105104
print('-------- Values Dictionary (key=value) --------')
@@ -108,7 +107,9 @@ def main():
108107
if event in (None, 'Exit'):
109108
print("[LOG] Clicked Exit!")
110109
break
111-
elif event == 'About':
110+
111+
window['-GIF-IMAGE-'].update_animation(sg.DEFAULT_BASE64_LOADING_GIF, time_between_frames=100)
112+
if event == 'About':
112113
print("[LOG] Clicked About!")
113114
sg.popup('PySimpleGUI Demo All Elements',
114115
'Right click anywhere to see right click menu',

0 commit comments

Comments
 (0)