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

PySimpleGUI returning none

When I execute this code, I don't understand why it gives a none after I press the back button. The main purpose of this code is changing from one window to another. import PySimpleGUI as sg class Canvas: def __init__(self): …
0
votes
1 answer

How do I avoid duplicate parents in pysimpleGUI tree (Tk tree?)

Given a list of dot-notation strings, I need to arrange them in a pySiplmpleGUI tree, but I can't figure out how to track the parents correctly. For example, if I have 3 strings: ['a.1', 'a.b.1', 'a.b.2'] I would expect: a |_ 1 |_ b …
morrows_end
  • 317
  • 3
  • 10
0
votes
1 answer

pysimplegui print stack trace to console

I'm trying my hand at pysimplegui to build my first UI. However, I keep getting an error but in a flash a stack trace appears before the screen, the program ends and unable to read it. Is there anyway to print the stack trace from pysimplegui to the…
ra67052
  • 449
  • 2
  • 4
  • 15
0
votes
1 answer

Find an element inside a PySimpleGui's Frame by a key

How to find an element inside a PySimpleGui's Frame by a key without hardcoding it via .Rows[0]? import PySimpleGUI as sg layout = [ [sg.Frame(layout=[ [sg.Text('Field:'), sg.Text('', key='key')], ])] ] window = sg.Window("Name",…
0
votes
0 answers

PySimpleGUI Multithreaded Implementation for OpevCV Workflow

I've been tooling around with PySimpleGUI for just a week now. I have not been able to decipher what DemoProgram(s) will help achieve my goal. Skills are novice/tinkerer. Project: RasberryPi OpenCV workflow using: HDMI bridge, initiated with shell…
0
votes
1 answer

PySimpleGUI RELIEF_SUNKEN Expands When Items Marked Visible But Does Not Shrink When They Are Marked Not Visible

I'm new to PYSimpleGUI and python GUI programming in general. I have made a simple settings relief that I'd like to have expand and contract as needed. Is there a way to get the 3rd picture to resemble the 1st once the elements have been marked…
0
votes
2 answers

As data for PySimplegui exit screen?

This def is my script that scans a website for active links. In this case, I wanted to know how to get this data and put it on the Pysimplegui OUTPUT screen. import PySimpleGUI as sg import requests from bs4 import BeautifulSoup import re sg.theme(…
0
votes
1 answer

How to set a colormap for PySimpleGUI Image()

Is there a way to set a colormap for sg.Image() or sg.DrawImage()? In my case I have a grayscale (single-band) thermal image that I'd like to show with a heat colormap. Short example of current code: import PySimpleGUI as sg layout =…
user8188435
  • 191
  • 5
  • 14
0
votes
1 answer

Determine string width in PySimpleGUI

I want to create a dynamic screen layout. Is there a way to determine the width for a string in a specific font?
Ruediger Jungbeck
  • 2,836
  • 5
  • 36
  • 59
0
votes
0 answers

Update plot based on selection with PysimpleGui

I try to do following: I have a frame, which I cleaned to plot some data. This new frame has 9 columns, one columns named "Cycle", four columns for temp [temp1,temp2,temp3,temp4] and four columns for pressure [p1,p2,p3,p4]. What I would like to…
SMS
  • 348
  • 2
  • 13
0
votes
1 answer

how to make a savable ui in python

I have a project that allows the user to make a quiz on their own using some buttons and input well i even want the user to be able to save their quiz in a file so they can load it in i don't want something BIG!! a txt file will do.. i am using…
CodeMaster
  • 35
  • 1
  • 8
0
votes
1 answer

PySimpleGUI for scripts with optional arguments?

I have a script which utilizes optional arguments with the help of argparse. When the optional arguments are not in use they default to None. I'm trying to build a GUI for the script with PySimpleGUI. The types for these optional arguments…
J.spenc
  • 339
  • 2
  • 3
  • 11
0
votes
1 answer

pysimplegui status bar acting strange

my problem: i have been trying to make a python clone of notepad to learn how pysimplegui works. so i started with following this video and then changed some code around to look more like notepad. but when i added a status bar i noticed it did not…
bruh nye
  • 39
  • 6
0
votes
1 answer

PySimpleGui: how to remove event-delay in Listboxes?

When reading events from a simple button in PySimpleGui, spamming this button with mouseclicks will generate an event for each of the clicks. When you try to do the same with Listboxes (by setting enable_events to True for this element) it seems…
Opifex
  • 362
  • 4
  • 15
0
votes
1 answer

Why does this asyncio call pause execution?

Here is my code: async def runTaskWrapped(options): layoutz = [[sg.Text("Running...", key="runstatus")]]; windowz = sg.Window("New Task", layoutz); x = threading.Thread(target=runTask, args=(options,)); x.start(); startTime =…