Re: Drag n drop from another application
Michael Lange <[email protected]> Fri, 25 Aug 2017 11:34:33 +0200
| Newsgroups | gmane.comp.python.tkinter |
|---|---|
| Message-ID | <[email protected]> |
Hi Vasilis, On Fri, 25 Aug 2017 08:21:03 +0000 Vasilis Vlachoudis <[email protected]> wrote: > Thank you Michael, > > is this the same with the Tkdnd.py module inside tkinter, or it is an > extension of it? no, Tkdnd.py is pure Tkinter code and can only handle dnd within one Tkinter program. For "real" dnd you will need tkdnd. BTW, iirc there is a problem with tkdnd-2.6 (which is still the version included with debian and probably other linux/unix systems). I am not 100% sure, but I believe drops would only work if the drop target is a direct child of the toplevel window, which has been fixed with tkdnd-2.8. I never really used tkdnd in a real application, so it's a little hard to remember exactly, it was something like this. With tkdnd-2.8 also dragging from Tkinter to the file manager should work, so if you want to use it, it might be a good idea to upgrade (although a number of X11 file managers I tested behaved differently, some accepted the drops from Tk, others wouldn't and pcmanfm always crashed :) You can find the latest version at https://sourceforge.net/projects/tkdnd/files/ , compiling should be rather easy, here a simple ./configure && make && make install did the job. Best regards Michael .-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-. Most legends have their basis in facts. -- Kirk, "And The Children Shall Lead", stardate 5029.5