center-tk-window-1.0.0
توضیحات
Functions for centering tkinter windows on parent or on screen
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | center-tk-window-1.0.0 |
| نام | center-tk-window |
| نسخه کتابخانه | 1.0.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Jarik Marwede |
| ایمیل نویسنده | jarikmarwede@zoho.eu |
| آدرس صفحه اصلی | https://github.com/jarikmarwede/center-tk-window |
| آدرس اینترنتی | https://pypi.org/project/center-tk-window/ |
| مجوز | - |
# 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
```python
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)
```
نحوه نصب
نصب پکیج whl center-tk-window-1.0.0:
pip install center-tk-window-1.0.0.whl
نصب پکیج tar.gz center-tk-window-1.0.0:
pip install center-tk-window-1.0.0.tar.gz