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: tkinter
Prompt user to choose the name and location when saving a pdf (python)
How can I change my code so I can save my final pdf (MergedFiles.pdf) with a name chosen by the user and in a location chosen by them. I would like to have a popup(maybe tkinter?) that will give the user the option of choosing the name and location to save the pdf file. Answer You can do this with
How to fix Tkinter dead frezzing or crashing because of huge data?
I am trying to make a program to display one single image (.png extension) at once but giving a button to the user to change the picture. What I have done is: Reading the Image from my directory with help of Pillow module Appended it to a list With a button I increase or decrease the index of the list.
Suppressing other canvas items from reacting to event
I have a rectangle on a canvas listening for events, with a callback function “A”. The blank space in the canvas is also listening to events with a callback function “B”. When the I right-click on the rectangle, both “A” and “B” are executed. I understand why this happens (the rectangle is on the canvas). The behavior I want to
How to select multiple checkbox then store values in a list? python
I have this sample code, I need to make multiple selections in that users list, after I hit OK, it stores checked value into another list named selected_users for later use. For example, when I run this code, a checkbox window pops out, and I tick Anne,Bob, click OK. selected_users is now [‘Anne’,’Bob’]. And Window disappears Answer You can do
How to display HTML Table data cell elements in Tkinter GUI using Selenium?
I want to make a program that takes the table data cell elements of tables from a wholesale website (the tables show stock of disposable vapes), and then will display which items are low on stock on a Tkinter GUI. So far I am using selenium to go to different URLs of various vapes and print out the stock of
Why am I getting error after looping into file and trying to join the list
I have large text file which has numbers. I want to loop through the file and append the numbers to the list_of_numbers. Problem is that the loop appends to the list but not in the way I want, that’s why the list looks like this after iteration this is just part of the output. I want this to be in
tkinter Python GUI Frame Positioning
How can you position the frames (and or elements inside the frames) such that the radio buttons at the bottom are shifted to the left outer edge of the GUI interface and the title is shifted to the center of the GUI interface? GUI Answer To achieve the goal: set columnspan=3 in frame_title.grid(…) set columnspan=2 in frame_fields.grid(…) move frame_scan to
Python project basing on picture to guess the answer for the flag name , I think that the while loop is the problem
My code snippet: I want to program a guessing game basing on the image of the flags from different countries. There are 6 countries which I picked. The user will have maximum 3 turns, if they are wrong 3 times, the game will end. The user cannot move to the next image until they guess correctly the current image right.
tkinter, pack inside grid and propagation not working
I am trying to create a button with a fixed size. So, I created a Frame (grid) with the size I want and then a child Button (pack) inside of the Frame that takes all the space. Here is a minimal example: Without the commented line above, I expected that it would work (having a rectangle of the specified size),