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.


To install run the following command: pip install center_tk_window


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., 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

Project details

Download files

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

Files for center-tk-window, version 1.0.0
Filename, size & hash File type Python version Upload date
center_tk_window-1.0.0-py3-none-any.whl (2.9 kB) View hashes Wheel py3
center_tk_window-1.0.0.tar.gz (1.7 kB) View hashes Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page