diff options
author | treectrl <treectrl> | 2004-08-11 00:36:05 (GMT) |
---|---|---|
committer | treectrl <treectrl> | 2004-08-11 00:36:05 (GMT) |
commit | aadd18edb00e5b326de9d8b286ddf8db7fd056d3 (patch) | |
tree | 36c175299cca276119460b14dc279acd5ee61da2 /library | |
parent | a2ee2419a7cd96449a3fedb29ed728d77f8bede4 (diff) | |
download | tktreectrl-aadd18edb00e5b326de9d8b286ddf8db7fd056d3.zip tktreectrl-aadd18edb00e5b326de9d8b286ddf8db7fd056d3.tar.gz tktreectrl-aadd18edb00e5b326de9d8b286ddf8db7fd056d3.tar.bz2 |
Use "item expand/collapse/toggle" commands.
Diffstat (limited to 'library')
-rw-r--r-- | library/treectrl.tcl | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/library/treectrl.tcl b/library/treectrl.tcl index 1f7b98d..a965818 100644 --- a/library/treectrl.tcl +++ b/library/treectrl.tcl @@ -129,13 +129,13 @@ bind TreeCtrl <Control-KeyPress-backslash> { } bind TreeCtrl <KeyPress-plus> { - %W expand [%W index active] + %W item expand [%W index active] } bind TreeCtrl <KeyPress-minus> { - %W collapse [%W index active] + %W item collapse [%W index active] } bind TreeCtrl <KeyPress-Return> { - %W toggle [%W index active] + %W item toggle [%W index active] } @@ -265,10 +265,10 @@ proc ::TreeCtrl::ButtonPress1 {w x y} { if {[lindex $id 0] eq "item"} { foreach {where item arg1 arg2} $id {} if {$arg1 eq "button"} { - $w toggle $item + $w item toggle $item return } elseif {$arg1 eq "line"} { - $w toggle $arg2 + $w item toggle $arg2 return } } @@ -325,10 +325,10 @@ proc ::TreeCtrl::DoubleButton1 {w x y} { if {[lindex $id 0] eq "item"} { foreach {where item arg1 arg2} $id {} if {$arg1 eq "button"} { - $w toggle $item + $w item toggle $item return } elseif {$arg1 eq "line"} { - $w toggle $arg2 + $w item toggle $arg2 return } } |