TIP 552: Extended treeview functionality.

Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.
    Author:        Peter Spjuth <[email protected]>
    State:         Draft
    Type:          Project
    Vote:          Pending
    Created:       19-Sep-2019
    Tcl-Version:   8.7
    Keywords:      Tk, treeview
    Tk-Branch:     pspjuth-treeview


This TIP proposes a set of new features for the Ttk treeview widget.




The following features are added to the treeview widget.

Locked horizontal scrolling

Adds the ability to lock the first column(s) from horizontal scrolling.

A new option -titlecolumns n is added, requesting columns to be locked.

Cell selection

Adds the ability to select individual cells as well as full rows.

Cell selection is independent of item selection.

Cells are identified with a two element list with item id and column id.

A new subcommand cellselection is added, mirroring the present selection. In addition the cellselection set command gets a version for selecting a rectangular range.

A new option -selecttype type is added to direct default bindings to use either item selection or cell selection.

The identify subcommand is updated with the cell option.

Default bindings are updated to use these features.

Striped rows

A new option -striped bool is added. This makes every other row get marked with the alternate state, and allows the theme to draw them in a different color. Built in themes are updated to put something fitting at that color.

Column separators

The -show option is extended with the value columnseparators to display a separator between columns. Built in themes are updated to define the separators.


Started on branch pspjuth-treeview


This document has been placed in the public domain.