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
Release history Release notifications | RSS feed
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-1.0.0.tar.gz
(1.7 kB
view hashes)
Built Distribution
Close
Hashes for center_tk_window-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d793a6b8e3d6eeefe58d229fc618fa3975cc1512c4a6af73f4298bed9272915 |
|
MD5 | 4c5e8e030e81de1030de8ef96e49a04d |
|
BLAKE2b-256 | 9ad0eccfc709feb6794f0460e354d79425f40ca3d33b051692b0fe501dd7ab60 |