summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-02-26 01:07:08 (GMT)
committerhobbs <hobbs>2002-02-26 01:07:08 (GMT)
commit81348b18fcd26678bbdd04d40a2370f13260fbc1 (patch)
tree41f90770e587f0768698c6d2298dcad946b1f974
parent3b8d498e8bfb88e531bdfa6fe1149e5b255c98d1 (diff)
downloadtk-81348b18fcd26678bbdd04d40a2370f13260fbc1.zip
tk-81348b18fcd26678bbdd04d40a2370f13260fbc1.tar.gz
tk-81348b18fcd26678bbdd04d40a2370f13260fbc1.tar.bz2
* library/scale.tcl: mirror B2 bindings to B3 on Windows to better
accomodate two button mice. [Patch #493145]
-rw-r--r--library/scale.tcl10
1 files changed, 9 insertions, 1 deletions
diff --git a/library/scale.tcl b/library/scale.tcl
index ac891be..76c8cb2 100644
--- a/library/scale.tcl
+++ b/library/scale.tcl
@@ -3,7 +3,7 @@
# This file defines the default bindings for Tk scale widgets and provides
# procedures that help in implementing the bindings.
#
-# RCS: @(#) $Id: scale.tcl,v 1.8 2001/08/01 16:21:11 dgp Exp $
+# RCS: @(#) $Id: scale.tcl,v 1.9 2002/02/26 01:07:08 hobbs Exp $
#
# Copyright (c) 1994 The Regents of the University of California.
# Copyright (c) 1994-1995 Sun Microsystems, Inc.
@@ -62,6 +62,14 @@ bind Scale <ButtonRelease-2> {
tk::ScaleEndDrag %W
tk::ScaleActivate %W %x %y
}
+if {[string equal $tcl_platform(platform) "windows"]} {
+ # On Windows do the same with button 3, as that is the right mouse button
+ bind Scale <3> [bind Scale <2>]
+ bind Scale <B3-Motion> [bind Scale <B2-Motion>]
+ bind Scale <B3-Leave> [bind Scale <B2-Leave>]
+ bind Scale <B3-Enter> [bind Scale <B2-Enter>]
+ bind Scale <ButtonRelease-3> [bind Scale <ButtonRelease-2>]
+}
bind Scale <Control-1> {
tk::ScaleControlPress %W %x %y
}