diff options
author | rjohnson <rjohnson@noemail.net> | 1998-10-10 00:30:33 (GMT) |
---|---|---|
committer | rjohnson <rjohnson@noemail.net> | 1998-10-10 00:30:33 (GMT) |
commit | 5b1c3804285a3e0374833c472e26ba0cf808b705 (patch) | |
tree | 5d1b6c4f80c96cbc9337259a6d98a40a78aff79b /library/listbox.tcl | |
parent | fc211e780d4c2d7a11bfe63ebbb3b95ad7d66b25 (diff) | |
download | tk-5b1c3804285a3e0374833c472e26ba0cf808b705.zip tk-5b1c3804285a3e0374833c472e26ba0cf808b705.tar.gz tk-5b1c3804285a3e0374833c472e26ba0cf808b705.tar.bz2 |
Added support for the MouseWheel event.
FossilOrigin-Name: 36ac110bcfabe39cd0f8f0af96e59dd73d52646e
Diffstat (limited to 'library/listbox.tcl')
-rw-r--r-- | library/listbox.tcl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/library/listbox.tcl b/library/listbox.tcl index ebef6ed..45f0b9b 100644 --- a/library/listbox.tcl +++ b/library/listbox.tcl @@ -3,10 +3,11 @@ # 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.3 1998/09/14 18:23:23 stanton Exp $ +# RCS: @(#) $Id: listbox.tcl,v 1.4 1998/10/10 00:30:36 rjohnson Exp $ # # Copyright (c) 1994 The Regents of the University of California. # Copyright (c) 1994-1995 Sun Microsystems, Inc. +# Copyright (c) 1998 by Scriptics Corporation. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -171,6 +172,14 @@ bind Listbox <B2-Motion> { %W scan dragto %x %y } +# The MouseWheel will typically only fire on Windows. However, +# someone could use the "event generate" command to produce one +# on other platforms. + +bind Listbox <MouseWheel> { + %W yview scroll [expr - (%D / 120) * 4] units +} + # tkListboxBeginSelect -- # # This procedure is typically invoked on button-1 presses. It begins |