summaryrefslogtreecommitdiffstats
path: root/library/listbox.tcl
diff options
context:
space:
mode:
authordonal.k.fellows@manchester.ac.uk <dkf>2008-12-28 23:43:14 (GMT)
committerdonal.k.fellows@manchester.ac.uk <dkf>2008-12-28 23:43:14 (GMT)
commit78f60c9b7a9ac9ab8d0bbfdbb7ad303e3fa36e79 (patch)
tree6849b204934d0286023de9a56adaf14750d2cce3 /library/listbox.tcl
parent313902ef5cc4f8d9a67fc4ae07e0b8496706b827 (diff)
downloadtk-78f60c9b7a9ac9ab8d0bbfdbb7ad303e3fa36e79.zip
tk-78f60c9b7a9ac9ab8d0bbfdbb7ad303e3fa36e79.tar.gz
tk-78f60c9b7a9ac9ab8d0bbfdbb7ad303e3fa36e79.tar.bz2
Corrected mouse-wheel bindings for widgets. Now Shift-wheel always scrolls the
text widget horizontally on all platforms.
Diffstat (limited to 'library/listbox.tcl')
-rw-r--r--library/listbox.tcl15
1 files changed, 14 insertions, 1 deletions
diff --git a/library/listbox.tcl b/library/listbox.tcl
index a746b8a..80310a5 100644
--- a/library/listbox.tcl
+++ b/library/listbox.tcl
@@ -3,7 +3,7 @@
# This file defines the default bindings for Tk listbox widgets
# and provides procedures that help in implementing those bindings.
#
-# RCS: @(#) $Id: listbox.tcl,v 1.18 2007/12/13 15:26:27 dgp Exp $
+# RCS: @(#) $Id: listbox.tcl,v 1.19 2008/12/28 23:43:14 dkf Exp $
#
# Copyright (c) 1994 The Regents of the University of California.
# Copyright (c) 1994-1995 Sun Microsystems, Inc.
@@ -196,6 +196,9 @@ if {[tk windowingsystem] eq "aqua"} {
bind Listbox <MouseWheel> {
%W yview scroll [expr {- (%D / 120) * 4}] units
}
+ bind Listbox <Shift-MouseWheel> {
+ %W xview scroll [expr {- (%D / 120) * 4}] units
+ }
}
if {"x11" eq [tk windowingsystem]} {
@@ -208,11 +211,21 @@ if {"x11" eq [tk windowingsystem]} {
%W yview scroll -5 units
}
}
+ bind Listbox <Shift-4> {
+ if {!$tk_strictMotif} {
+ %W xview scroll -5 units
+ }
+ }
bind Listbox <5> {
if {!$tk_strictMotif} {
%W yview scroll 5 units
}
}
+ bind Listbox <Shift-5> {
+ if {!$tk_strictMotif} {
+ %W xview scroll 5 units
+ }
+ }
}
# ::tk::ListboxBeginSelect --