TreeviewEx
TreeviewEx is a lightweight extension for Tkinter's built-in Treeview widget.
It adds useful editing features while keeping the standard Treeview behavior intact.
Features
- Vertical and horizontal scrollbars
- Cell editing
- Read-only support for rows, columns, and cells
- Combobox-style editing for rows, columns, and cells
Installation
pip install treeviewex
Quick example
from tkinter import Tk
from treeviewex import TreeviewEx
root = Tk()
root.title("TreeviewEx Example")
treeview_ex = TreeviewEx(root)
treeview_ex.grid(row=0, column=0, sticky="nsew")
columns = ("col1", "col2", "col3")
treeview_ex["columns"] = columns
treeview_ex.heading("#0", text="", anchor="w")
treeview_ex.column("#0", width=0, stretch=False)
for col in columns:
treeview_ex.heading(col, text=col.capitalize())
treeview_ex.column(col, width=120)
for i in range(5):
treeview_ex.insert(
"",
"end",
text="",
values=(f"Value {i}A", f"Value {i}B", f"Value {i}C"),
)
root.mainloop()
Public interfaces
set_readonly_row(row_id: str, readonly: bool = True) -> None
Set the specified row to readonly.
set_readonly_column(column_id: str, readonly: bool = True) -> None
Set the specified column to readonly.
set_readonly_cell(cell_id_pair: tuple, readonly: bool = True) -> None
Set the specified cell to readonly.
set_combobox_row(row_id: str, values: list = None, is_combobox: bool = True) -> None
Set the specified row to be editable with a Combobox.
set_combobox_column(column_id: str, values: list = None, is_combobox: bool = True) -> None
Set the specified column to be editable with a Combobox.
set_combobox_cell(cell_id_pair: tuple, values: list = None, is_combobox: bool = True) -> None
Set the specified cell to be editable with a Combobox.
License
This project is licensed under the MIT License.
Metadata
Release files for treeviewex 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| treeviewex-1.2.1.tar.gz | 48.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| treeviewex-1.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 55.3 kB
Release files / treeviewex-1.2.1.tar.gz
| Download URL | treeviewex-1.2.1.tar.gz |
|---|---|
| Size | 48.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
26eadb3b0a1a9c8b8b0998db34715cb384210c28f27182cf406b3826fe021f0f
|
|
BLAKE2b-256 checksum How to use checksums |
03d75d804ecfecc4c0724240b0d98b767a56806000c4f87eb528dca158e0b27e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / treeviewex-1.2.1-py3-none-any.whl
| Download URL | treeviewex-1.2.1-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
52898fbdb14707f157fe10cc0f3168025d54e04109862e1c01a7c233ade03228
|
|
BLAKE2b-256 checksum How to use checksums |
ac9bfe9735612e40af1231da9683d79e8c6a75bb525e2b93e7df0f7559724626
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|