summaryrefslogtreecommitdiffstats
path: root/tests/scrollbar.test
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-01-08 11:38:16 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-01-08 11:38:16 (GMT)
commit53100bbaa986eb70a8c1337bd65b096d93bf4ac4 (patch)
tree921cdb1c3709017c3931d3b8b2177c304a085229 /tests/scrollbar.test
parent36db175996d43acf3e378e3ddb71d1977f04e4e3 (diff)
parent8e521a94152cd4546be53ea626f09f96f1f102d4 (diff)
downloadtk-53100bbaa986eb70a8c1337bd65b096d93bf4ac4.zip
tk-53100bbaa986eb70a8c1337bd65b096d93bf4ac4.tar.gz
tk-53100bbaa986eb70a8c1337bd65b096d93bf4ac4.tar.bz2
Fixed bug [1927212] - MouseWheel unbound for non-aqua scrollbars
Diffstat (limited to 'tests/scrollbar.test')
-rw-r--r--tests/scrollbar.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/scrollbar.test b/tests/scrollbar.test
index c6a5a90..8f92c93 100644
--- a/tests/scrollbar.test
+++ b/tests/scrollbar.test
@@ -632,6 +632,21 @@ test scrollbar-9.1 {scrollbar widget vs hidden commands} {
list [winfo children .] [interp hidden]
} [list {} $l]
+test scrollbar-10.1 {<MouseWheel> event on scrollbar} -constraints win -setup {
+ destroy .t .s
+} -body {
+ pack [text .t -yscrollcommand {.s set}] -side left
+ for {set i 1} {$i < 100} {incr i} {.t insert end "Line $i\n"}
+ pack [scrollbar .s -command {.t yview}] -fill y -expand 1 -side left
+ update
+ focus -force .s
+ event generate .s <MouseWheel> -delta -120
+ after 200 {set eventprocessed 1} ; vwait eventprocessed
+ .t index @0,0
+} -cleanup {
+ destroy .t .s
+} -result {2.0}
+
catch {destroy .s}
catch {destroy .t}