Posted to tcl by utz at Wed Jul 17 09:32:42 GMT 2019view pretty

ttk::panedwindow .p -orient horizontal
ttk::frame .p.left
ttk::treeview .p.left.tree -yscrollcommand {.p.left.s set}
ttk::scrollbar .p.left.s -command {.p.left.tree yview}
ttk::frame .p.right
pack .p -fill both -expand 1
pack .p.left.tree -fill both -expand 1 -side left
pack .p.left.s -fill y -side left
.p add .p.left -weight 1
.p add .p.right -weight 3

Comments

Posted by avl at Wed Jul 17 09:59:47 GMT 2019 [text] [code]

pack the scrollbar first (with -side right)

Posted by utz at Wed Jul 17 10:11:15 GMT 2019 [text] [code]

The problem is that in the above form, when dragging the panedwindow divider to the left, the scrollbar will eventually disappear. The solution (kindly provided by avl42) is to pack the scrollbar first, using -side right.