What is the correct/official/proper/recommended way of accomplishing drag/drop in tkinter? My documentation section 24.1.1 includes:
Tkdnd Drag-and-drop support for Tkinter. This is experimental and should become deprecated when it is replaced with the Tk DND.
but I can find no other official documentation. Does Tkinter have drag/drop support at all? Is this something version dependant? Is this something not yet included in tk(tcl) which will then filter through to tkinter?
I should stress that I am talking about drag/drop between different applications and that I am currently using python 2 (although any solution which relies on python 3 would still be of interest).
However, the simplest way to enable dragging from a widget is to reimplement the widget's mousePressEvent() and start a drag and drop operation: def mousePressEvent(self, event): if (event. button() == Qt. LeftButton and iconLabel.
PAGE is an drag-and-drop GUI generator, bearing a resemblance to Visual Basic. It allows one to easily create GUI windows containing a selection of Tk and ttk widgets. Use it to build GUIs in Python and Tcl/tk. But before you install it you must download Activestate Tcl/tk software.
Tkinter Designer was created to speed up the GUI development process in Python. It uses the well-known design software Figma to make creating beautiful Tkinter GUIs in Python a piece of cake 🍰 . Tkinter Designer uses the Figma API to analyse a design file and create the respective code and files needed for the GUI.
Tkinter has no built-in support for dragging and dropping between applications. Tkdnd is, AFAIK, the only way to accomplish it without writing the low level code yourself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With