summaryrefslogtreecommitdiffstats
path: root/library/text.tcl
diff options
context:
space:
mode:
authormarc_culler <marc.culler@gmail.com>2023-11-21 23:16:52 (GMT)
committermarc_culler <marc.culler@gmail.com>2023-11-21 23:16:52 (GMT)
commitb0d31264c787b4be2ebc7c76087cab702a2a5aed (patch)
treeae3c9158a49f5a12417acd2ad69a2f4adc2bb1a0 /library/text.tcl
parente248b31dcf690c7e53152483247d999679106ca5 (diff)
downloadtk-b0d31264c787b4be2ebc7c76087cab702a2a5aed.zip
tk-b0d31264c787b4be2ebc7c76087cab702a2a5aed.tar.gz
tk-b0d31264c787b4be2ebc7c76087cab702a2a5aed.tar.bz2
Add bindings for Scrollbar and Listbox. Fix bindings for Text.
Diffstat (limited to 'library/text.tcl')
-rw-r--r--library/text.tcl4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/text.tcl b/library/text.tcl
index c582fe3..0467df5 100644
--- a/library/text.tcl
+++ b/library/text.tcl
@@ -459,10 +459,10 @@ set ::tk::Priv(prevPos) {}
bind Text <Control-MouseWheel> {
lassign [tk::PreciseScrollDeltas %D] deltaX deltaY
if {$deltaX != 0} {
- %W xview scroll $deltaX pixels
+ %W xview scroll [expr {-$deltaX}] pixels
}
if {$deltaY != 0} {
- %W yview scroll $deltaY pixels
+ %W yview scroll [expr {-$deltaY}] pixels
}
}
bind Text <MouseWheel> {