[Enhancement] Simple drag and drop support
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
Línea de trabajo
Comienza siguiendo la creación de Window y el flujo de eventos y valores de window.read() para el port de tkinter, y después compara la compatibilidad existente con arrastrar y soltar descrita para los elementos Qt Input y Multiline. Define cómo deben representarse los archivos y el texto sin formato soltados, implementa la compatibilidad para toda la ventana para el port de escritorio solicitado y verifica que las acciones de soltar produzcan un evento y un valor utilizables.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 13.8k
- Forks
- 1.8k
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de PySimpleGUI/PySimpleGUI
-
Bug Done - Install Dev Build (see docs for how) Platform Specific Issue - Linux Port - TK
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
PySimpleGUI/PySimpleGUI#6904 · 15 comentarios ·
-
Bug Demo Programs Done - Install Dev Build (see docs for how) Interoperability Port - TK workaround available
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
PySimpleGUI/PySimpleGUI#6900 · 1 comentario ·
-
Done - Install Dev Build (see docs for how) enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
PySimpleGUI/PySimpleGUI#3251 · 12 comentarios ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 74/100
PySimpleGUI/PySimpleGUI#6906 · 1 comentario · 1 reacción ·
-
Bug Done - Install Dev Build (see docs for how) Port - TK
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
PySimpleGUI/PySimpleGUI#6902 · 1 comentario ·
Todos los issues de PySimpleGUI/PySimpleGUI
Issues similares
-
essnmx good first issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 95/100
-
[Feature] 奇物选择添加优先级 Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
syfoud/Simulated_Scepter#174 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Giskard-AI/giskard-oss#2840 · 1 comentario ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success Abiertoarea: repo bug perceived difficulty: 2
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
yeti-platform/yeti#1380 ·