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

Connect/Process a script to PySimpleGUI button

can you guys help me to know how to connect a button in my PySimpleGui script which will execute another python script when the run button is pressed/clicked. For now, i've been reading about Subprocess and command = os.popen in a GUI script.…
2
votes
1 answer

Draw Rectangle on Image in Pysimplegui

I am looking to draw a rectangle on an Image using Pysimplegui. I have tried to do it using the Graph object but as far as I know you can not do anything on an image object. I found an alternative in Pygame but my script is already built up to this…
Tylerr
  • 201
  • 2
  • 12
2
votes
1 answer

Getting the value or index of Combobox item?

I am trying to make my GUI display information depending on the item chosen in the combobox. PySimpleGUI cookbook says that I should be using GetSelectedItemsIndexes() method, but when I try using…
milka1117
  • 521
  • 4
  • 8
  • 17
2
votes
1 answer

Using PySimpleGUI to divide the window in columns gives an error

I am tring to construct a GUi that would display two columns: one column would have all the input fields and listboxes, the second column would display some data from pandas dataframe. I thought it would be a good idea to do this using Frames, but I…
milka1117
  • 521
  • 4
  • 8
  • 17
2
votes
1 answer

Hiding GUI elements dynamically using radio button in PySimpleGUIQt

I used below approach from this post to hide GUI elements which works very well: import PySimpleGUIQt as sg layout = [ [sg.Checkbox('Module Selection', default = False, change_submits= True, key = '_checkbox1_', size=(15,1)), …
Anudocs
  • 686
  • 1
  • 13
  • 54
2
votes
1 answer

Is there an pysimplegui function to get the the loction of the input cursor?

I am making an application which includes a form, at some point, I have a multiline element that must be filled by the user and I need the cursor location because the user must indicate after a specific text location of the multiline element. I have…
plusultra
  • 41
  • 4
2
votes
2 answers

unexpected behaviour of return_keyboard_events in PySimpleGUI

import PySimpleGUI as sg layout = [[sg.Button("OK1", key='1', bind_return_key=True)], [sg.Button("OK2", key='2', bind_return_key=True)], [sg.Button("OK3", key='3', bind_return_key=True)]] window = sg.Window("Keyboard Test",…
2017kamb
  • 192
  • 3
  • 8
  • 27
2
votes
1 answer

Read() method for InputText in PySimpleGUI only reading last row with variable layout

I'm using the PySimpleGUI library, and trying to make a GUI (code below) to input a codeword puzzle (essentially the same format as a crossword). I want my GUI to be an array of textboxes of specified dimensions that can take a number or letter. It…
samm82
  • 240
  • 4
  • 14
2
votes
2 answers

How To Read File Input In pySimpleGUI Then Pass It On To A Number-Crunching Processor

I would like to take input from pySimpleGUI, feed it into a normal Python var, then feed it into a music processor as I love music. I had already tried to use wxPython for this but was unable to even get a simple fileDialog without crashing. …
Ismail Ahmed
  • 41
  • 2
  • 6
2
votes
1 answer

Executable build flashes and terminates

I would like to build simple GUI apps based in Python that can be distributed to my co-workers. In this process, I learnt about PySimpleGUI27 for Python 2.7 version. The following is a simple code that produces a window with menu options. I then…
Rene Duchamp
  • 2,429
  • 2
  • 21
  • 29
1
vote
0 answers

Altering an element within a column (PySimpleGui)

I'd like to update the image associated with a button inside of a column and have failed in my attempts. I know how to alter a button, but I don't see how to access the button element when its in a column. Windows 10, pysimplegui 4.60.5, python…
1
vote
1 answer

Changing direction of menu in pysimplegui?

i'm trying to build a menu based on persian language in pysimplegui . i want my whole menu have RTL direction . are there any suggestions ?
S.Katuzian
  • 13
  • 6
1
vote
1 answer

How could I get away with AttributeError while tryning to run my program powered by PySimpleGUI in Python?

Well, I first downloaded the PySimpleGUI module by using pip install PySimpleGUI in terminal. Afterwards, I got a sequence of multiple errors. I attempted this: import PySimpleGUI as sg label = sg.Text('Type in a to-do') input_box =…
1
vote
1 answer

Bold a single letter in a word with 'sg.Text()' in PySimpleGUI

On PySimpleGUI, how can I bold only a letter in a word with sg.Text(), like Hello? I can only bold the entire word or with space between "H" and "ello" when I do [sg.Text("H", font=("bold")), sg.Text("ello").] Thanks.
jsmith0910
  • 111
  • 1
1
vote
1 answer

Why is my SQLAlchemy delete function not working when using PySimpleGUI?

I have created the database in sql alchemy, imported into frontend, and wrote functions to delete it, however, when I click to delete it, it does nothing: def delete_task(values): selected_rows = values['-TABLE-'] if selected_rows: …
sartep
  • 69
  • 4