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
2
votes
1 answer

PySimpleGUI loop need better way

I tried a to loop some elements in PySimpleGUI using PySimpleGUIQt here's the code: list_1 = ['a', 'b', 'c', 'd'] list_2 = ['e', 'f', 'g', 'h'] layout = [[Sg.Column([[Sg.Input(do_not_clear=True, size=(20, 0.7), enable_events=True,…
WoLvES 2.0
  • 41
  • 5
2
votes
1 answer

check if all inputs has values in pysimplegui

I have a window that has multiple inputs and combo selectbox like this main_layout = [[sg.Text('First Name', size=(15, 1)), sg.InputText(key='gname', size=(25, 1))], [sg.Text('V Type', size=(15, 1)), sg.Combo(['option 1','option 2','option…
CatChMeIfUCan
  • 569
  • 1
  • 7
  • 26
2
votes
1 answer

How to raise an event when Enter is pressed into an InputText in PySimpleGUI

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: # Text field sg.InputText( key=key, default_text='', enable_events=True, ), ... …
Tirrel
  • 778
  • 2
  • 7
  • 23
2
votes
2 answers

How I increase my box of inputText in pysimplegui?

I used size but nothing changed: input = [ [sg.Text("Type your text")], [sg.InputText(key='text', size=(200,200))], [sg.Button("Sent")] ] wInput = sg.Window("Exercicio Python", input, size=(400,450)) while True: events, values =…
Ju Grigori
  • 143
  • 1
  • 6
2
votes
1 answer

PySimpleGUI / Tk: very slow startup on Mac

I was spending a lot of time trying to understand why loading time of PySimpleGUI with Tk on Mac OS X takes so much time. To be more specific: window.refresh() takes 9 seconds for my (quite simple) full UI. I reduced it for the investigation, so…
ishahak
  • 6,585
  • 5
  • 38
  • 56
2
votes
1 answer

How to have PySimpleGUI default text in Output on window opening

I am using PySimpleGUI to create a text output box. On opening the program, I would like the Output to display some default text before any button is pressed. How can I get this to occur? window.Read() waits for a button press. window.refresh()…
masher
  • 3,814
  • 4
  • 31
  • 35
2
votes
0 answers

How can I minimize my PySimpleGUI program in system tray while keeping the program opened in background?

I have made a application in PySimpleGUI and it is working fine. Now I want to add the functionality in this so the user can run the program and minimize it into system tray. I have checked and found the following dummy code for creating system tray…
2
votes
3 answers

How to open a file upon button click PySimpleGui

my goal is to create a button and when the button is pressed to open txt file. I have already created button in the layout but I can't figure out how to make a txt file open upon button click. This is python and I'm using PySimpleGui as…
2
votes
2 answers

I can't use the Menu in PySimpleGUI

I want to add a feature to change the background using the menu but it doesn't work. When I click on any menu item, nothing happens, the background doesn't change and it doesn't print anything. Maybe I'm also doing the background change in a wrong…
zHary_
  • 75
  • 6
2
votes
1 answer

Force users to select a file with PySimpleGui?

I'm new to PySimpleGui and I've searched every recipe for something that may help me and came up empty handed. What I'm trying to do is: User will select a file, click a button and the app will do something with the file. This is what I have so…
ana.la
  • 109
  • 5
2
votes
1 answer

PySimpleGUI - scroll on canvas?

I have a canvas where I draw an image that image contains a console text where I display the last 10 lines or something I want to change the lines (array index) I display by catching mouse wheel events there is no scroll bar so I don't have a huge…
user7082181
  • 354
  • 3
  • 15
2
votes
3 answers

print() output in the GUI screen

I am hoping someone can help me. Basically, I have an arbitrary script, in this script, there are many functions and after each function is executed, print() is executed as well to give me an update. I'm using the Pysimplegui library for GUI, and…
2
votes
1 answer

Files or Folder Browse in PySimpleGUI

Is there a way to either choose one file in a folder or multiple files in a folder or just a folder (and then process all the files inside it) with PySimpleGUI? So far I've made something like this: import PySimpleGUI as sg layout =…
Bruno Fonseca
  • 93
  • 1
  • 1
  • 9
2
votes
1 answer

Distributing Computer App w/ GUI (Python)

I am new to Stack Overflow and had a question on a python application I have been working on for a while as part of a fun little personal project. Basically, the app consists of utilizing Selenium to login to my school portal, (I am a college…
Nad
  • 31
  • 3
2
votes
1 answer

Is there a way to get inputs using their keys in Python's PySimpleGUI?

I would like to know how to get a value (Text Input Box) using it's key but I don't really know how. I think you can use values['key_name_here'] but I am not sure. I have tried that but it didn't seem to work. (At least I tried it on a text label) I…
WhatTheClown
  • 464
  • 1
  • 7
  • 24