Skip to main content

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.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for treeviewex 1.0.2
File Size Uploaded
treeviewex-1.0.2.tar.gz 42.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for treeviewex 1.0.2
File Interpreter ABI Platform
treeviewex-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 48.6 kB

Release files / treeviewex-1.0.2.tar.gz

Download URL treeviewex-1.0.2.tar.gz
Size 42.3 kB
Tags Source
SHA-256 checksum
How to use checksums
95c9477083563d6ccab6176afb25a972d15939b5cb36213e75915139b3ff411b
BLAKE2b-256 checksum
How to use checksums
dc7fcb5a6ae1d975c5acb9d4c036239a0aa39cf6c3f0686ffea6293d2c712154
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.0.2-py3-none-any.whl

Download URL treeviewex-1.0.2-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
44eeb7f8e28e38311e01daab6fc34b674c58f24a792d4072bcd90cb27a52db73
BLAKE2b-256 checksum
How to use checksums
5e731c53cfb2b2d48f2a5e0963ffe1f45def587d42b03d6986ed8322d4f00ff7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

This release

1.0.2 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page