diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-25 09:21:04 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-25 09:21:04 (GMT) |
commit | 806e7862d404cf9f85f85ff6d4b3e74eb09317f6 (patch) | |
tree | 706882fe6334e9de5f11cf853a8b3b69b63b4f3f /library/demos | |
parent | aa8237ea926f3a1b19e4501879e6d32f6e0b7e6c (diff) | |
download | tk-806e7862d404cf9f85f85ff6d4b3e74eb09317f6.zip tk-806e7862d404cf9f85f85ff6d4b3e74eb09317f6.tar.gz tk-806e7862d404cf9f85f85ff6d4b3e74eb09317f6.tar.bz2 |
New utility function ::tk::MouseWheel
Diffstat (limited to 'library/demos')
-rw-r--r-- | library/demos/cscroll.tcl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/library/demos/cscroll.tcl b/library/demos/cscroll.tcl index 52a9e1a..90b1afc 100644 --- a/library/demos/cscroll.tcl +++ b/library/demos/cscroll.tcl @@ -60,16 +60,16 @@ if {[package vsatisfies [package provide Tk] 8.7-]} { bind $c <Button-2> "$c scan mark %x %y" bind $c <B2-Motion> "$c scan dragto %x %y" bind $c <MouseWheel> { - %W yview scroll [expr {%D/-30.0}] units + tk::MouseWheel %W y %D -30.0 } bind $c <Option-MouseWheel> { - %W yview scroll [expr {%D/-3.0}] units + tk::MouseWheel %W y %D -3.0 } bind $c <Shift-MouseWheel> { - %W xview scroll [expr {%D/-30.0}] units + tk::MouseWheel %W x %D -30.0 } bind $c <Shift-Option-MouseWheel> { - %W xview scroll [expr {%D/-3.0}] units + tk::MouseWheel %W x %D -3.0 } } elseif {[tk windowingsystem] eq "aqua"} { bind $c <Button-3> "$c scan mark %x %y" |