spyoungtech / FreeSimpleGUI

The free-forever GUI library
GNU Lesser General Public License v3.0
272 stars 35 forks source link

add drag-to-drop support, using tkinterDnd #8

Open gef12 opened 3 months ago

gef12 commented 3 months ago

add drag-to-drop support, using tkinterDnd, for images etc, without using freesimpleGuiQT (as it is very outdated compared to the standard), I made a fork with some possible solutions integrating with tkinterdnd2-universal

spyoungtech commented 3 months ago

I took a look at your fork and this looks pretty cool. I think drag and drop support would be something FreeSimpleGUI users are interested in.

Though, at first glance, I feel that this support may be better offered as a separate PyPI package. That is to say, such that maybe your demo would end up look something like this:

import FreeSimpleGUI as sg
import fsg_dnd as dnd # a separate package
# ...
# use the third-party dnd elements alongside FreeSimpleGUI elements
layout = [dnd.DnDImage(...), ...]

This way, users can make choices of what additional dependencies they want to install (and subsequently redistribute with their app). If a user doesn't need/want these dragNdrop elements, they can choose not to take along the additional dependencies.

As a more complete explanation of my initial thought process here... My first pass at taking a look at tkinterdnd2 is that it includes some vendored code (license unclear) and some compiled binaries. I feel some FreeSimpleGUI users may have reasonable reservations about this -- for example, licensing requirements for redistribution of applications made using FreeSimpleGUI and security concerns around unsigned compiled binaries whose contents may not be easy to inspect/verify from a security perspective.

gef12 commented 3 months ago

I'll take a look and see a better solution, since I'm not a regular Python programmer it might take me a while.