pysimplegui

How to add image/icon in menu item on pysimplegui

How to add image/icon in menu item on pysimplegui Question: I am using PySimplegui for UI development,want to know if there is a way to add menu icon as shown in the image below this can be done with Tkinter and is working fine ,but i am failed to find any references in pysimplegui any …

Total answers: 2

global variable not recognized; says its local variable

global variable not recognized; says its local variable Question: Its not recognizing the global variable. I experienced this issue before and thought the global variable would prevent the error but no matter what i try it always returns this: local variable ‘P1o’ referenced before assignment #import pwinput import PySimpleGUI as sg P1o = ("") P2o …

Total answers: 1

Dynamic subplot using Figures in Matplotlib

Dynamic subplot using Figures in Matplotlib Question: I want to create a subplot using matplotlib with pysimplegui where each time i select some signals-checkbox(list of values) i should get a plot corresponding to it which will dynamically increase or decrease in size based on my selection so when i select a checkbox the respective plot …

Total answers: 1

Entering pan mode after embedding Matplotlib figure and toolbar into PySimpleGUI

Entering pan mode after embedding Matplotlib figure and toolbar into PySimpleGUI Question: Is there a way to programmatically enter Matplotlib’s pan mode, given that the figure is embedded into PySimpleGUI? just like this I’m basically looking for the equivalent of fig.canvas.manager.toolbar.pan() (which doesn’t seem to work with PySimpleGUI, as fig.canvas.manager is None in that case). …

Total answers: 1

How do I fix key not found error in python?

How do I fix key not found error in python? Question: I’m new to coding and I’m trying to write a password manager program here. I decided to use sg.Frame instead of sg.Tab (Which worked just fine but I just don’t like how it looked.) and ran into this problem where it has problem finding …

Total answers: 1

Python – PySimpleGUI. How to make a scroll in sg.Column?

Python – PySimpleGUI. How to make a scroll in sg.Column? Question: I have sg.Column whit enabled options "scrollable" and "vertical_scroll_only". I add new elements to it using extend_layout. When there are a lot of elements, the scroll is not activated. I used this article – How to add a field or element by clicking a …

Total answers: 1

Creating threaded popups in PySimpleGUI

Creating threaded popups in PySimpleGUI Question: I have trouble creating either multiple windows or popups using PySimpleGUI. Each window/popup is supposed to be called from a seperate thread and timeout after 2 seconds. Using following implementation results in (as expected) this error: main thread is not in main loop. How do I fix that? def …

Total answers: 1

how to return value inside a dictionary which is changed by a radio button

how to return value inside a dictionary which is changed by a radio button Question: I created a dictionary with two keys, when selecting one of the keys, the dictionary items are updated, the problem is that I am not returning the selected value within the updated list. for example, when selecting ‘male’, and then …

Total answers: 1