diff options
author | jenglish <jenglish@flightlab.com> | 2008-01-06 19:16:11 (GMT) |
---|---|---|
committer | jenglish <jenglish@flightlab.com> | 2008-01-06 19:16:11 (GMT) |
commit | 5d7c64a19265cd805fbdc6df205b165c443d1b3e (patch) | |
tree | 0a0cdee32b9b0eb6aeeb28d1744978eec5205628 /library/ttk/treeview.tcl | |
parent | 31517078d5e2f32ae3c2fc6c99279beedf1da777 (diff) | |
download | tk-5d7c64a19265cd805fbdc6df205b165c443d1b3e.zip tk-5d7c64a19265cd805fbdc6df205b165c443d1b3e.tar.gz tk-5d7c64a19265cd805fbdc6df205b165c443d1b3e.tar.bz2 |
Fix MouseWheel bindings for ttk::treeview widget
(Fixes #1442006, #1821939, #1862692)
Diffstat (limited to 'library/ttk/treeview.tcl')
-rw-r--r-- | library/ttk/treeview.tcl | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/library/ttk/treeview.tcl b/library/ttk/treeview.tcl index 3ccb746..a5ebcb2 100644 --- a/library/ttk/treeview.tcl +++ b/library/ttk/treeview.tcl @@ -1,4 +1,4 @@ -# $Id: treeview.tcl,v 1.2 2006/12/18 19:33:14 jenglish Exp $ +# $Id: treeview.tcl,v 1.3 2008/01/06 19:16:12 jenglish Exp $ # # ttk::treeview widget bindings and utilities. # @@ -56,13 +56,7 @@ bind Treeview <Shift-ButtonPress-1> \ bind Treeview <Control-ButtonPress-1> \ { ttk::treeview::Select %W %x %y toggle } -# Standard mousewheel bindings: -# -bind Treeview <MouseWheel> { %W yview scroll [expr {- (%D / 120) * 4}] units } -if {[string equal "x11" [tk windowingsystem]]} { - bind Treeview <ButtonPress-4> { %W yview scroll -5 units } - bind Treeview <ButtonPress-5> { %W yview scroll 5 units } -} +ttk::copyBindings TtkScrollable Treeview ### Binding procedures. # @@ -163,7 +157,7 @@ proc ttk::treeview::Select {w x y op} { } } -## DoubleClick -- Double-ButtonPress-1 binding. +## DoubleClick -- Double-ButtonPress-1 binding. # proc ttk::treeview::DoubleClick {w x y} { if {[set row [$w identify row $x $y]] ne ""} { @@ -261,7 +255,7 @@ proc ttk::treeview::heading.release {w} { # ## SelectOp $w $item [ choose | extend | toggle ] -- -# Dispatch to appropriate selection operation +# Dispatch to appropriate selection operation # depending on current value of -selectmode. # proc ttk::treeview::SelectOp {w item op} { @@ -282,10 +276,10 @@ proc ttk::treeview::select.extend.browse {w item} { BrowseTo $w $item } ## -selectmode multiple: # -proc ttk::treeview::select.choose.extended {w item} { +proc ttk::treeview::select.choose.extended {w item} { BrowseTo $w $item } -proc ttk::treeview::select.toggle.extended {w item} { +proc ttk::treeview::select.toggle.extended {w item} { $w selection toggle $item } proc ttk::treeview::select.extend.extended {w item} { @@ -304,7 +298,7 @@ proc ttk::treeview::select.extend.extended {w item} { # in preorder traversal order. $item1 and $item2 may be # in either order. # -# NOTES: +# NOTES: # This routine is O(N) in the size of the tree. # There's probably a way to do this that's O(N) in the number # of items returned, but I'm not clever enough to figure it out. |