Skip to main content

Center tk window

A small library for centering tkinter windows on their parent or on the screen.

Installation

To install run the following command: pip install center_tk_window

Usage

import tkinter
import center_tk_window

root_window = tkinter.Tk()
window_to_center = tkinter.Toplevel(root_window)

# Center a window on its parent unless it is the root window in which case it will be centered on screen.
center_tk_window.center(root_window, window_to_center)

# Center a window on its parent
center_tk_window.center_on_parent(root_window, window_to_center)

# Center a window on the screen
center_tk_window.center_on_screen(window_to_center)

Release files for center-tk-window 1.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 center-tk-window 1.0.0
File Size Uploaded
center_tk_window-1.0.0.tar.gz 1.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for center-tk-window 1.0.0
File Interpreter ABI Platform
center_tk_window-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 4.5 kB

Release files / center_tk_window-1.0.0.tar.gz

Download URL center_tk_window-1.0.0.tar.gz
Size 1.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9688bc30d66f614120060f104f9ea43fe4eddb2953065a96affb7b6b70dbeeb8
BLAKE2b-256 checksum
How to use checksums
cf2cc47e93b539aab661f570c14f56720ab22753b50236bdf9ba29cf82657603
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Release files / center_tk_window-1.0.0-py3-none-any.whl

Download URL center_tk_window-1.0.0-py3-none-any.whl
Size 2.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1d793a6b8e3d6eeefe58d229fc618fa3975cc1512c4a6af73f4298bed9272915
BLAKE2b-256 checksum
How to use checksums
9ad0eccfc709feb6794f0460e354d79425f40ca3d33b051692b0fe501dd7ab60
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Release history Release notifications | RSS feed

This release

1.0.0 This release

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