How to let the Tkinter textarea accept dropping an external file on Python 3.X? How to let the Tkinter textarea accept dropping an external file on Python 3.X? tkinter tkinter

How to let the Tkinter textarea accept dropping an external file on Python 3.X?


I guess you'd already take a look at the TkDND extension for Tkinter.Looking at its docs seems like it has some support for drag and drop external targets too:

"For example under windows the type "FILENAME" can be used in order to receive a single filename from the Explorer or the type "NetscapeURL" can be used in order to receive a bookmark drop from Netscape Navigator. Under Unix, the type "FILE_NAME" can be used in order to receive a filename from a Motif application."

Says the docs at: http://klappnase.bubble.org/TkinterDnD/TkinterDnD_manual.html

You should try this if you really need to use Tkinter.

Otherwise, for better results and possibilities, I would advise you to use a more complete GUI framework like Qt which has bindigs for drop events natively.