Skip to content
Advertisement

Tag: pysimplegui

Align image center pysimpleGui

I use image (and button) as so: How do I align the myImg to center? I tried google can’t find anything on how to do it. I read somebody suggested justification=’center’ but I don’t know where to put that. I tried [myImg, justification=’center’] didn’t work just crash the app. Answer Based on documentation you can use Column with justification=’center’ to

How do I respond to window resize in PySimpleGUI

How can I get notified when the window is resized in PySimpleGUI? I have a window that enables resize events, but I’m not finding a way to move the elements around when that resize occurs, so my window renames top left centered the same size when the window changes size. Here is the basic code: Answer You need to bind

Force overlay a PySimpleGUI window

I just want that if someone tries to close the GUI window using close button instead of clicking “OK”, the window reappears… In simple words, they cannot close this one or access any other window without clicking “OK”. Answer It is defined in source code of PySimpleGUI. You can change it to generate an event “WIN_CLOSE”, like this

Advertisement