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

  1. ttk::panedwindow .p -orient horizontal
  2. ttk::frame .p.left
  3. ttk::treeview .p.left.tree -yscrollcommand {.p.left.s set}
  4. ttk::scrollbar .p.left.s -command {.p.left.tree yview}
  5. ttk::frame .p.right
  6. pack .p -fill both -expand 1
  7. pack .p.left.tree -fill both -expand 1 -side left
  8. pack .p.left.s -fill y -side left
  9. .p add .p.left -weight 1
  10. .p add .p.right -weight 3


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.