Skip to main content

tkinter_dndr

A package that provides tkinter (in python) with support for drag/drop and widget resizing of widgets directly on a GUI window

PLEASE READ THIS FILE TO FULLY UNDERSTAND AND USE THIS PACKAGE WITHOUT ISSUES.

----- GENERAL OVERVIEW OF THE PACKAGE (A tkinter Drag/Drop and Resize Package) -----

tkinter_DnDR is short form for tkinter_Drag/Drop, Resize

This package is one that provides drag/drop and widget resizing support to tkinter widget. What this means is that you (as programmer) can make your widget move to any position on the GUI window (drag/drop). It additionally means that you can resize your widget directly on the GUI window.

For widget resizing, you can resize your widget in any direction you can think of (even diagonally), whether:

  • UP (or NORTH) direction
  • DOWN(or SOUTH) direction
  • RIGHT (or EAST) direction
  • LEFT (or WEST) direction
  • UP-RIGHT (or NORTH-EAST) direction
  • UP-LEFT (or NORTH-WEST) direction
  • DOWN-RIGHT (or SOUTH-EAST) direction
  • DOWN-LEFT (or SOUTH-WEST) direction

----- HOW TO USE THIS PACKAGE -----

First import the tkinter_dndr module. The tkinter_dndr module contains a class called DragDropResizeWidget.

  1. Create an instance/object of the DragDropResizeWidget class. This class receives your widget as a positional argument.

EXAMPLE: instance = DragDropResizeWidget(w), where w is the widget you want to give drag/drop or resize support

NOTE: Any instance of the DragDropResizeWidget class, contains three(3) methods:

a) instance.make_draggable() # Provides only drag/drop support to widget

b) instance.make_resizable() # Provides only resizing support to widget

c) intance.make_draggable_and_resizable() # Provides both drag/drop and resizing support to widget

  1. Call any of the above methods (a,b or c) as you desire

e.g: instance.make_draggable()

  1. NOTE: I HAVE INCLUDED A test_dndr.py file in package directory. Run/Open this file to see and understand how this package works.

----- NOTE -----

-- To use the .make_draggable() method, your widget MUST use the PACK or PLACE layout managers (either .pack() or .place())

-- To use the .make_resizable() method, your widget MUST ONLY use the PLACE layout manager

-- To use the .make_draggable_and_resizable() method, your widget MUST ONLY use the PLACE layout manager

-- If using the .make_resizable() or .make_draggable_and_resizable_method(), you MUST define x,y,width and height in .place() for your widget

e.g: widget.place(x=5, y=10, width=10, height=12)

I will endeavour to make SUBSEQUENT VERSIONS of this package work well with any layout manager (whether .grid(), .pack() or .place())

----- A USAGE EXAMPLE OF THIS PACKAGE -----

See the test_dndr.py file in the package directory for a usage example.

----- AUTHOR OUT 🙂 -----

Feel free to reach me via a Github issue if you have anything you like patched or added.

If your software/project relies on this package fully supporting all layout managers or any other desired support/addition, I am only an email away.

HAPPY TO HELP 😄
IMPROVEMENTS/SUGGESTIONS are welcome 😉

Metadata

Release files for tkinter-dndr 0.0.6

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

Source distribution (sdist)

Source distribution for tkinter-dndr 0.0.6
File Size Uploaded
tkinter_dndr-0.0.6.tar.gz 6.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tkinter-dndr 0.0.6
File Interpreter ABI Platform
tkinter_dndr-0.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 11.3 kB

Release files / tkinter_dndr-0.0.6.tar.gz

Download URL tkinter_dndr-0.0.6.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
8808c0e678a29ad1d408522c3d65acb4112e2116e94012c5f08ca33b726595cb
BLAKE2b-256 checksum
How to use checksums
6c73ffe9b4619ef40c08f42dc8edc14864e13de7cd8cf55dffb865ece0bbe45e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.13

Release files / tkinter_dndr-0.0.6-py3-none-any.whl

Download URL tkinter_dndr-0.0.6-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d3e70fae87c663a0e5edf7dd67e51f42b7a4259053b2a549e26c78c00cd563db
BLAKE2b-256 checksum
How to use checksums
1224c42090a6048faf5f420b5b4ad042121cdf4a2b712f50e25d58fa051c325a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.13

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 release files

0.0.5

2 release files

0.0.1

2 release files

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