Skip to main content

A library for centering python gui windows.

Project description

pypi Python-3.9.2|3.9.3|3.9.4|3.9.5 platform win|linux

centerit

A python library for centering the tkinter and PyQt windows.

You can use this library to center your Tkinter or PyQt windows both horizontally and vertically. That means your window will show in the middle of the screen.

How to install

First clone the repository using

git clone https://github.com/MrinmoyHaloi/centerit

or download as a zip file and extract it.

or pip install centerit

How to use

import everything from the library using

from centerit import *

Then Call centertk for Tkinter

centertk(root, width, height)

and centerqt for PyQt5

centerqt(root, width, height)

You just have to pass the root window name and the dimensions you want for your root window.

I used python 3.9.5 to develop it. I test it out with python 3.9.2. I used windows 10 20H2 and parrot os 4.11.1(Debian Based) to test it. I will apreciate if someone test it out with other versions of python that is lower than 3.9.2. I will try to add support for other gui libraries in the future, Like wxPython, PyQt4, PySide2 etc.

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

centerit-0.6.tar.gz (9.5 kB view hashes)

Uploaded Source

Built Distribution

centerit-0.6-py3-none-any.whl (9.7 kB view hashes)

Uploaded Python 3

Supported by

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