Sep-22-2021, 05:26 PM
(This post was last modified: Sep-22-2021, 05:26 PM by deanhystad.)
You put window.read() in the wrong place. It needs to be placed inside the while True: loop. Your code can only process one event per window. That is why you have to keep having to redraw the window all the time. The way you are processing events is probably why your program crashes. It is not worth your time trying to figure out this particular bug because there are so many things being done incorrectly that can all be traced back to that one fundamental mistake.
There is a PySimpleGUI cookbook that you should read. It will help you redesign your program. And you need to redesign your program.
Be happy. You won't have to remember and restore window positions anymore!
There is a PySimpleGUI cookbook that you should read. It will help you redesign your program. And you need to redesign your program.
Be happy. You won't have to remember and restore window positions anymore!