: '''[BWidget]::Tree''' ''pathName'' ?''option value…''? This is a [tree] widget that uses a [canvas] internally to display a hierarchical list of items (called nodes). **Manual page** http://tcllib.sourceforge.net/BWman/Tree.html **Examples** * [Tree nodes in motion] * [Display a graph in a BWidget Tree] * [LemonTree] * [starDOM] ---- <>Selection Improvements [TR] - The '''Tree''' has no default binding for the selection of ranges. This is usually done by selectiong a node and then selecting another while pressing down the ''Shift'' key. This proc will do the work: ====== proc TreeSelectRange {tree node} { # # add a continuous range of nodes to an existing selection # # tree -> path to the BWidget tree # node -> the node that has been clicked on # # remember current selection: set sel [$tree selection get] # get last selected node: set last [lindex $sel end] # select the requested range: $tree selection range $last $node # add the remembered nodes: foreach node $sel {$tree selection add $node} } ====== Then you just need something like ====== $tree bindText [list TreeSelectRange %W] ====== to make the binding work. <> Widget | BWidget