Attachment "tv_padding.tcl" to
ticket [8f2fdde1]
added by
emiliano
2026-10-19 22:02:30.
package require Tk 9.1
# style with no focus, no indent
ttk::style configure NiNf.Treeview -indent 0
ttk::style configure NiNf.Treeview.Row -focusthickness 0
ttk::style map NiNf.Treeview.Row -focusthickness {focus 0}
pack [ttk::treeview .tv -style NiNf.Treeview -selectmode none]
foreach i {1 2 3} {
set id [.tv insert {} end -text "Level 1: $i" -open 1]
foreach j {a b c} {
set cid [.tv insert $id end -text "Level 2: $j"]
.tv tag add LEVEL2 $cid
}
}
# this makes the focus ring visible on the left
.tv tag configure LEVEL2 -padding {10 0 0 0}