A small package for easily using Tkinter.
Project description
Documentation ManagerTk
ManagerTk - is a library that aims to make writing code using Tkinter simple and fast.
Download Package
pip install ManagerTk
Functions:
coord_view(window, mode_bool) - Creates an empty duplicate of the window in which it tracks the mouse coordinates in the window.
create_mpage(window, ui_page, size) - Creates a window with the specified parameters and interface.
redirect_pages(page_ui_1, page_ui_2, side=None) - Sends from one page of the program to another.
add_url_image(window, url, size) - Adds a picture from the url address as an object with a specified size (optional, you can omit it).
window_exit(title: str, message: str) - Displays the screen with the specified text and exits the program if the question is answered positively.
documentation() - Displays a link to the module documentation.
Example:
import tkinter
import ManagerTk
window = tkinter.Tk()
window.title("Example")
count = 0
def counter_click():
global count
count += 1
counter_label["text"] = f"Count clicks: {count}."
label_1_page = tkinter.Label(text="First Page Title")
label_2_page = tkinter.Label(text="Second Page Title")
label_1_in_1_page = tkinter.Label(text="Default text in page 1")
label_1_in_2_page = tkinter.Label(text="Default text in page 2")
button_1_in_2_page = tkinter.Button(text="Default button with function in page 2", command=counter_click)
counter_label = tkinter.Label(text=f"Count clicks: {count}.")
icon = ManagerTk.add_url_image(window, "https://i.ibb.co/p0yMNc0/DK404-icon.png", (80, 80))
button_1t2 = tkinter.Button(text="Redirect to second page.",
command=lambda: ManagerTk.redirect_pages(page_1, page_2))
button_2t1 = tkinter.Button(text="Redirect to first page",
command=lambda: ManagerTk.redirect_pages(page_2, page_1))
page_1 = [
[label_1_page, [150, 20]],
[label_1_in_1_page, [20, 60]],
[icon, [320, 40]],
[button_1t2, [20, 150]]
]
page_2 = [
[label_2_page, [150, 20]],
[label_1_in_2_page, [20, 60]],
[button_1_in_2_page, [160, 80]],
[counter_label, [20, 80]],
[button_2t1, [20, 150]]
]
ManagerTk.create_mpage(window, page_1, "400x200")
window.mainloop()
This example creates a simple application with two functional pages that can be switched using buttons.
Contacts
Telegram - @DK50503
Discord - DK404#4089
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
ManagerTk-0.1.post2.tar.gz
(4.6 kB
view details)
Built Distribution
File details
Details for the file ManagerTk-0.1.post2.tar.gz
.
File metadata
- Download URL: ManagerTk-0.1.post2.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3224b0e7438b2690634abbf951a61dccc49f969360d58132b5491d716bf49bd3 |
|
MD5 | cc9918c8556c375602e5f6d1fd29bce0 |
|
BLAKE2b-256 | 3bcc0ae7abb59eebede9e05ca42d0302885ffec19aa48a714d9e7f9cc7bab7ff |
File details
Details for the file ManagerTk-0.1.post2-py3-none-any.whl
.
File metadata
- Download URL: ManagerTk-0.1.post2-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4819aaae035585579d0e72a5845ef463d2113536651631d9cd21e9760c5b94a4 |
|
MD5 | 8b4159067f80a7dc9d6530a809998430 |
|
BLAKE2b-256 | ecf47802d732cc34035272b87be8ac3c8a76909b7ca1c563c39e80fa9eb42f25 |