summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-01-08 11:39:08 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-01-08 11:39:08 (GMT)
commit93871e55e0916c42bc9d393fdba3814b1b45e285 (patch)
treec2237a7e10afd1b3c85ed57d0f04fa33938aa829 /tests
parent9585548e0c8e9888638122b776be2e37e92bd271 (diff)
downloadtk-93871e55e0916c42bc9d393fdba3814b1b45e285.zip
tk-93871e55e0916c42bc9d393fdba3814b1b45e285.tar.gz
tk-93871e55e0916c42bc9d393fdba3814b1b45e285.tar.bz2
(cherry-pick) Fixed bug [1927212] - MouseWheel unbound for non-aqua scrollbars
Diffstat (limited to 'tests')
-rw-r--r--tests/scrollbar.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/scrollbar.test b/tests/scrollbar.test
index 5d4334f..10aa7d6 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}