[Enhancement] Simple drag and drop support
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
Inizia tracciando la creazione di Window e il flusso di eventi e valori di window.read() per il port tkinter, quindi confronta il supporto esistente per il trascinamento della selezione descritto per gli elementi Qt Input e Multiline. Definisci come devono essere rappresentati i file e il testo semplice rilasciati, implementa il supporto a livello dell’intera finestra per il port desktop richiesto e verifica che i rilasci producano un evento e un valore utilizzabili.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Type of Issue (Enhancement, Error, Bug, Question)
Enhancement
Environment
Operating System
Windows version 10 21H2
PySimpleGUI Port (tkinter, Qt, Wx, Web)
tkinter, Qt, Wx
Versions
Python version (sg.sys.version)
3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:50:30) [MSC v.1933 64 bit (AMD64)]
PySimpleGUI Version (sg.__version__)
4.60.4
GUI Version (tkinter (sg.tclversion_detailed), PySide2, WxPython, Remi)
8.6.12
Troubleshooting
These items may solve your problem. Please check those you've done by changing - [ ] to - [X]
- Searched main docs for your problem www.PySimpleGUI.org
- Looked for Demo Programs that are similar to your goal Demos.PySimpleGUI.org
- If not tkinter - looked for Demo Programs for specific port
- For non tkinter - Looked at readme for your specific port if not PySimpleGUI (Qt, WX, Remi)
- Run your program outside of your debugger (from a command line)
- Searched through Issues (open and closed) to see if already reported Issues.PySimpleGUI.org
- Tried using the PySimpleGUI.py file on GitHub. Your problem may have already been fixed but not released
Detailed Description
In short, make it possible to drop file(s) and plain text (which includes urls from browser address bar) into a Window.
In both Windows and Mac, drag and drop is one of the first things that the users learn, it is easy and intuitive. Depriving an app of ability to implement drag and drop is crippling it. It's no better than, say, disabling right mouse clicks.
Currently, PySimpleGUI provides a very limited drag and drop support.
According to https://github.com/PySimpleGUI/PySimpleGUI/issues/732 and https://github.com/PySimpleGUI/PySimpleGUI/issues/6047, it's only Qt port (which is still in Alpha since 2020) and only Input and Multiline elements. Such limitations lead to questionable layout choices, and it's kind of awkward asking users to "aim for that little text input thingy" too.
So here's how I imagine the solution. Something very basic and easy to use, e.g.
Create a Window with enable_drag_and_drop_events property set to True.
After that, dropping a file or text anywhere into a Window would generate an event, and event, values = window.read() would return something like DND:<plain text or path plus file name> as event or maybe just DND for event and a special key-value pair in values for the actual data.
Any desktop port will do, but tkinter is preferable since it's more complete and doesn't seem outdated like Qt and Wx versions.
- Lingua principale
- Python
- Stelle
- 13.8k
- Fork
- 1.8k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PySimpleGUI/PySimpleGUI
-
Bug Done - Install Dev Build (see docs for how) Platform Specific Issue - Linux Port - TK
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
PySimpleGUI/PySimpleGUI#6904 · 15 commenti ·
-
Bug Demo Programs Done - Install Dev Build (see docs for how) Interoperability Port - TK workaround available
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
PySimpleGUI/PySimpleGUI#6900 · 1 commento ·
-
Done - Install Dev Build (see docs for how) enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
PySimpleGUI/PySimpleGUI#3251 · 12 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 74/100
PySimpleGUI/PySimpleGUI#6906 · 1 commento · 1 reazione ·
-
Bug Done - Install Dev Build (see docs for how) Port - TK
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
PySimpleGUI/PySimpleGUI#6902 · 1 commento ·
Tutte le issue di PySimpleGUI/PySimpleGUI
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
anthropics/skills#1811 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
speaches-ai/speaches#678 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
datalayer/mcp-compose#42 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
conda-forge/spacy-feedstock#177 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
UKGovernmentBEIS/inspect_evals#2523 ·