Skip to main content

Functions for centering tkinter windows on parent or on screen

Project description

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

center_tk_window-0.0.1.tar.gz (1.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

center_tk_window-0.0.1-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file center_tk_window-0.0.1.tar.gz.

File metadata

  • Download URL: center_tk_window-0.0.1.tar.gz
  • Upload date:
  • Size: 1.7 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for center_tk_window-0.0.1.tar.gz
Algorithm Hash digest
SHA256 79835b9786599b523b9f6dac1dd7d8bb6fa0b25e8d894f2161afe120cf448f30
MD5 b2045b683b243a3ceed58dab40d16219
BLAKE2b-256 cff50c9a8309aaf22bcb87745ae2bdf7977ffff13aacaf28b4ee8c0620953afd

See more details on using hashes here.

File details

Details for the file center_tk_window-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: center_tk_window-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for center_tk_window-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5f4ca4e20b3ba2ded93accafc3f21c2d32baedeb2b562ed5d2deecf6db397651
MD5 0539c8eced71e9fd898140f581d9a768
BLAKE2b-256 887922582111ec10a51866c4d1c6d8585e5c64f64e7230a28fef10515bcc5f3e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page