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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfcae0042d3d4771f1d4a98545fff9cc76c8f36aec15cf44eb641f79a4373e4f |
|
MD5 | abf5960609cd792f338c94fa3cfbac10 |
|
BLAKE2b-256 | 6af0f0885a82d7580150464821c8285a565a52611c1ba009d6298ae28c6c8b64 |
Close
Hashes for ctktablerowselector-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4892caeaba285f19f2372c64bdbe49dc5e4fbe91b7d3cec0d7757ac1345eb18b |
|
MD5 | d2e0c19fcbcf04406cf81b07d871562c |
|
BLAKE2b-256 | 8a351a650421f31515f3bde8292b136ff95eaeb286827a9221d960f12c836ac5 |