Skip to main content

# tkinterDnD Tkinter Drag-N-Drop module. Import this module with `python import tkinterDnD as dnd ` To make a widget draggable, do `python dnd.make_draggable(widget) ` To make a draggable widget inside a frame, do `python dnd.make_draggable(frame) dnd.make_draggable_component(widget) ` Here’s an example of this module being put to use. `python import tkinter import tkinterDnD as dnd tk = tkinter.Tk() tk.title("tkinterDnD") frame = tkinter.Frame(tk, bd=4, height=64, width=64, bg="red") frame.place(x=0,y=0) dnd.make_draggable(frame) label = tkinter.Label(frame, text="Hello", bg="red", wraplength=64, justify=tkinter.CENTER) label.config(highlightbackground="black") label.place(relx=0.5, rely=0.5, anchor=tkinter.CENTER) dnd.make_draggable_component(label) frame = tkinter.Frame(tk, bd=4, height=64, width=64, bg="green") frame.place(x=0,y=0) dnd.make_draggable(frame) label = tkinter.Label(frame, text="World", bg="green", wraplength=64, justify=tkinter.CENTER) label.config(highlightbackground="black") label.place(relx=0.5, rely=0.5, anchor=tkinter.CENTER) dnd.make_draggable_component(label) tk.mainloop() ` # Side note: The module has a default snap grid of 16x16 units.

Release files for tkinterDnD 0.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tkinterDnD 0.0.0
File Size Uploaded
tkinterDnD-0.0.0.tar.gz 1.9 kB Details

Release files / tkinterDnD-0.0.0.tar.gz

Download URL tkinterDnD-0.0.0.tar.gz
Size 1.9 kB
Tags Source
SHA-256 checksum
How to use checksums
613f81e1118985c36a3fdcfc7d23206938d7e44f9734ac351ec71ef987096fba
BLAKE2b-256 checksum
How to use checksums
a22a8d2e5d6f352aa286cfb43dcca516753b8d85144897fd8b4e5706f308dff0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

Release history Release notifications | RSS feed

This release

0.0.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page