PySimpleGUI / PySimpleGUI/PySimpleGUI
[Question] Options for creating a dynamic, clickable set of elements (image, text, etc.)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13.8k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
Type of Issue (Enhancement, Error, Bug, Question)
Question
Operating System
Linux Mint 22
PySimpleGUI Port (tkinter, Qt, Wx, Web)
tkinter
Versions
Python Interpeter: ~/[PROJECT]/.venv/bin/python3
Python version: 3.12.3
Platform: Linux
Platform version: ('glibc', '2.39')
Port: PySimpleGUI
tkinter version: 8.6.14
PySimpleGUI version: 6.2
PySimpleGUI filename: ~/[PROJECT]/.venv/lib/python3.12/site-packages/PySimpleGUI/PySimpleGUI.py
Troubleshooting
- Searched main docs for your problem PySimpleGUI Documenation
- Looked for Demo Programs that are similar to your goal. It is recommend you use the Demo Browser! Demo Programs
- None of your GUI code was generated by an AI algorithm like GPT
- Run your program outside of your debugger (from a command line)
- Searched through Issues (open and closed) to see if already reported Issues.PySimpleGUI.com
- Upgraded to the latest release of PySimpleGUI on PyPI (Version 6)
Detailed Description
I'd like to create clickable sets of elements, that is, an image and some text elements. I'd like to be able to click on any part of that set of elements (the image, the text, or anywhere in between them) and run some code when that happens. These sets of elements need to be dynamic, in that they will be added/removed based on user input.
What I've tried:
- A
Columnwith the various elements inside it
I don't know how to make the whole column clickable though... - A
Table
Rows are clickable, but apparently you cannot add images to a table... - A
Tree
You can add images, but you cannot resize them (like with ansg.Imageelement)
So what's the best solution here? Am I missing anything?
Screenshot, Sketch, or Drawing
This is what I have currently when using Columns (enter a search term and a list of results are displayed). I want the green box to be clickable.
Watcha Makin?
An app that essentially lets me edit JSON files for a static website - it'll read in a JSON file of YouTube videos and display them on the left. On the right is what I'm building now - the ability to search for a movie or TV series and copy it's TMDB ID to paste into the video's JSON data.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the issue's comparison of Column, Table, and Tree elements, then review the linked PySimpleGUI documentation and demo programs for dynamic layouts and click handling. Done means identifying and documenting a supported approach for clickable image-and-text groups, or clearly confirming that the requested behavior is not available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100