summaryrefslogtreecommitdiffstats
path: root/library/demos/tree.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'library/demos/tree.tcl')
-rw-r--r--library/demos/tree.tcl12
1 files changed, 3 insertions, 9 deletions
diff --git a/library/demos/tree.tcl b/library/demos/tree.tcl
index b46943a..828560d 100644
--- a/library/demos/tree.tcl
+++ b/library/demos/tree.tcl
@@ -3,14 +3,13 @@
# This demonstration script creates a toplevel window containing a Ttk
# tree widget.
#
-# RCS: @(#) $Id: tree.tcl,v 1.4 2007/12/13 15:27:07 dgp Exp $
+# RCS: @(#) $Id: tree.tcl,v 1.5 2008/12/11 18:13:08 jenglish Exp $
if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
}
package require Tk
-package require Ttk
set w .tree
catch {destroy $w}
@@ -74,13 +73,8 @@ proc populateTree {tree node} {
## Create the tree and set it up
ttk::treeview $w.tree -columns {fullpath type size} -displaycolumns {size} \
-yscroll "$w.vsb set" -xscroll "$w.hsb set"
-if {[tk windowingsystem] ne "aqua"} {
- ttk::scrollbar $w.vsb -orient vertical -command "$w.tree yview"
- ttk::scrollbar $w.hsb -orient horizontal -command "$w.tree xview"
-} else {
- scrollbar $w.vsb -orient vertical -command "$w.tree yview"
- scrollbar $w.hsb -orient horizontal -command "$w.tree xview"
-}
+ttk::scrollbar $w.vsb -orient vertical -command "$w.tree yview"
+ttk::scrollbar $w.hsb -orient horizontal -command "$w.tree xview"
$w.tree heading \#0 -text "Directory Structure"
$w.tree heading size -text "File Size"
$w.tree column size -stretch 0 -width 70