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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file centerit-0.6.tar.gz.

File metadata

  • Download URL: centerit-0.6.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for centerit-0.6.tar.gz
Algorithm Hash digest
SHA256 6fef7217ef063c895f4098c2592e67fcd128ef46975a95371b8c9fafbf0a5930
MD5 fd1381acd126e03d15b0874a5033c9c8
BLAKE2b-256 9ea7503e16eccb830e20e70f45107e4ab1f42f7c15599c55c8ffe2e7d7f6a72e

See more details on using hashes here.

File details

Details for the file centerit-0.6-py3-none-any.whl.

File metadata

  • Download URL: centerit-0.6-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for centerit-0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 61d8cbbd56a88445da58d236ede37345df493217e934eb30b55692c9c4938a2e
MD5 ca513eb38543eb179368fe9167615f08
BLAKE2b-256 3d7a2c57693e5eb534f24fdcd89b414143a39075f87aebce18f7afb0072c8f8a

See more details on using hashes here.

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