Questions tagged [pysimplegui]

Question about PySimpleGUI. The python package that supports simplified GUI generation using Tkinter.

PySimpleGUI is a python package that supports simplified GUI generation using Tkinter.

You can read more about the package here

1204 questions
0
votes
1 answer

AttributeError: module 'PySimpleGUI' has no attribute 'theme'

I have try sg.theme('DarkAmber') but I got the error "AttributeError: module 'PySimpleGUI' has no attribute 'theme'" software version: python3.6, PySimpleGUI version:4.16.0 platform: ubuntu 16.04
drewhaha
  • 25
  • 4
0
votes
2 answers

Integrate Pygame in PySimpleGUI

I have a game written with a Pygame loop and it currently draws everything happening in the pygame window. I now want to integrate this window into a larger PySimpleGUI window to have nice functionality around the game. Is this possible? I tried to…
Eli
  • 156
  • 8
0
votes
1 answer

Issue when re-using layout in PySimpleGUI

I have a pop-up with a user input field using PySimpleGUI. If the user types the wrong input I want to show some text beneath the input field saying that they need to type it in again. My idea this far is the code below: def start_pop_up(self,…
Eli
  • 156
  • 8
0
votes
1 answer

The EXE file made in Pyinstaller does not start, although everything works in vscode

Code (partial): #coding=utf-8 import PySimpleGUI as sg import zipfile ## import markup def main(): layout = [......... it is written in python3. 9. 0 and runs the interface with buttons.The PySimpleGUI library is used for this. Next, I make an…
Albra
  • 101
  • 4
0
votes
1 answer

Two Column Listbox pySimpleGui

I have a database with two columns: ID, Color (1, "red", 2 , "green", etc.) and I am trying to dynamically display the list of the colors with a Checkbox next to the description. Is this possible? This is what I am trying to do dynamically rather…
0
votes
1 answer

Make string appear equal length

I am trying to make string appear as that same length, so that when joined they appear as columns. import PySimpleGUI as sg a = ('IIII'.rjust(6,'*')) b = ('OOOO'.rjust(6,'*')) layout = [[sg.Text(a), sg.Text(a), sg.Text(a)],…
0
votes
1 answer

How do I prevent PysimpleGUI from closing the window

For some reason, even though I'm not sure why it's doing that, my program just closes the window instead of it doing what I want it to do while True: event, values = main_window.read() if event in (None,"Exit"): break if…
eyal gelberg
  • 21
  • 1
  • 5
0
votes
2 answers

Trying to read excel cells through openpyxl using PySimpleGUI in Python

I'm trying to get PySimpleGUI to read specific excel cells. While the code in itself works, it doesn't return the correct cell value once it's used with PySimpleGUI. It only returns the headers, but not the other rows. Any ideas on how to fix it…
Robin Sage
  • 969
  • 1
  • 8
  • 24
0
votes
1 answer

PySimpleGUI list index out of range for listbox widget?

I am running the following code and get this error. i want to be able to upload a file, do some processing, then view the graphs. The list is showing up as empty - however it should be pulling values from the fig_dict and not the filebrowse values…
user11874651
0
votes
0 answers

Group Data by Months

I have a dataframe in pandas This code is part of a function in a GUI and I'm trying to create one line of string that would mention the amount of cases every month whereas the continent and location is selected from the user. This is the dataset I…
0
votes
1 answer

How to find highest and lowest value and aggregate into a string in Pandas, Pysimplegui

I have a dataframe in pandas This code is part of a function in a GUI and I'm trying to create one line of string that would mention the highest count of COVID cases in a country within a continent whereas the continent is selected from the…
0
votes
4 answers

How to change the popup size in PysimpleGUI in python?

I am using PYsimpleGUI in my python code, and while using the popup element how do you resize the popup window? My code: import PySimpleGUI as sg sg.popup("Hello!") How to resize sg.popup? Also, is there an option to add a title to the popup…
Ameya Uppina
  • 131
  • 1
  • 3
  • 13
0
votes
0 answers

How to make columns in listbox?

I want to implement into my listbox columns (marked purple) like in the picture below: Main window in my gui is divided into two tabs. I paste here only code from tab into which I want to implement columns. Listbox is already here: tab1_layout = [ …
beginsql
  • 135
  • 7
0
votes
1 answer

pysimplegui keyboard event returns question mark when pressing non-ascii character

I'm using pysimplegui and trying to receive keyboard events from the window. I used the following initialization: window = sg.Window('Window Title', layout, finalize=True, return_keyboard_events=True) I receive keyboard events normally, but when a…
0
votes
1 answer

PySimpleGUI theme updates?

I am new to Python and PySimpleGUI. I'm just playing around at the moment with the Everything Bagel sample program available from the PySImpleGUI website. I have got the second window to work for changing the current theme, but I have been looking…