drag and drop an image to kivy

343 views
Skip to first unread message

mpad

unread,
May 3, 2012, 4:45:40 PM5/3/12
to kivy-...@googlegroups.com
Hi !

On a desktop (linux/windows/osx), is it possible to drag an image (ex: a web browser) and drop it in a kivy app, for example on a widget which could then react to it ?

Thanks for any hint !










Mathieu Virbel

unread,
May 3, 2012, 10:14:22 PM5/3/12
to kivy-...@googlegroups.com
Hi,

No simple solution exist. Since our main window on desktop depend
directly on Pygame, Pygame don't offer any event for drag&drop.
You can read more at
http://stackoverflow.com/questions/682692/python-desktop-integration-drag-and-drop

I know that SDL 1.3 have introduced a new SDL_DROPFILE event, but the
Pygame you're using depend on SDL 1.2, and i'm not even sure it's
reflected in the latest pygame version.

Anyway, if you found a way to abstract it, and implement for all the
platform using existing libs (pythoncom on win32 for eg), that would be
awesome, independant of pygame, and we could push it in the kivy codebase!

Good luck,

Mathieu
Reply all
Reply to author
Forward
0 new messages