Wrapper class around CTkTable to let users select rows
Project description
CTkTableRowSelector
Wrapper class around CTkTable to let users select rows.
Features
- Plug&Play: No shady attributes, create an instance and get the values you need.
- Easy to use interface.
- Select multiple rows using CTRL-Key.
- Headers are selectable or not, based on your need.
- 100% test coverage. All interactions with the CTkTable are tested using pytest.
- Stable.
- Vertical table support.
Install
pip install CTkTableRowSelector
Example
Note: You can run a more advanced example using
python3 -m CTkTableRowSelector
.
import customtkinter
from CTkTable import *
from CTkTableRowSelector import *
root = customtkinter.CTk()
value = [
["Header" + letter for letter in "ABCDE"],
*[[i, i+1, i+2, i+3, i+4] for i in range(0, 25, 5)]
]
table = CTkTable(master=root, row=5, column=5, values=value)
table.pack(expand=True, fill="both", padx=20, pady=20)
# Add the selector
row_selector = CTkTableRowSelector(table)
# Get the value
button = customtkinter.CTkButton(
root, text="Print selected rows", command=lambda: print(row_selector.get())
)
button.pack(pady=(0, 20))
root.mainloop()
## Licence This project is delivered under the MIT Licence.
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
Built Distribution
Close
Hashes for ctktablerowselector-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02725b21e6f15adf1ac0d82b4f20461f0a583c530c5f184fa54a2e57ee866f99 |
|
MD5 | 61c21ed922a1203019fe98a4b6843dfc |
|
BLAKE2b-256 | 0780f15e5002baecb6e212de461317c1a1ca58c953ef201751abd13460b1a354 |
Close
Hashes for ctktablerowselector-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 350632a6f4c56e4438284af13b8ea8c41211db1fbe96f8827abfe884b76d13e6 |
|
MD5 | 248b1d603d940dd56e84e51a2e5a260e |
|
BLAKE2b-256 | f608727f7ec4857735e0f2143634577ea011e942734931501961a9de5325db2c |