i’m new with Python & PySimpleGUI and i don’t know how to force my application to handle the event key; this is my code: My code can handle any key pressed by user except ; i haven’t found any argument for InputText similar to “bind_return_key=True” used into Button class. How can i do it? Thanks Answer Using method bind(“<Return>”, key_modifier)
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
Is it possible to insert a checkbox in a PysimpleGui table?
I want to create a PySimpleGui table where multiple rows can be selected just using the mouse (for an app in python3). The pysimplegui table allows to select various rows by means of Ctrl and Shift as usual, but i need to do this only by clicking at the rows. I have tried to do it by inserting a checkbox
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