diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-01-08 22:10:59 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-01-08 22:10:59 (GMT) |
commit | bfd23c8031316d2b1269299adc88cb71407aa741 (patch) | |
tree | c6cb6b751f75c8a59e80f6d2d81e8a980cd0f293 /tests/scrollbar.test | |
parent | a1a7b85d0a4953d55526a961d805de833c43db8f (diff) | |
download | tk-bfd23c8031316d2b1269299adc88cb71407aa741.zip tk-bfd23c8031316d2b1269299adc88cb71407aa741.tar.gz tk-bfd23c8031316d2b1269299adc88cb71407aa741.tar.bz2 |
Make test-case and binding equal for win32 and x11. Test-case doesn't pass yet
Diffstat (limited to 'tests/scrollbar.test')
-rw-r--r-- | tests/scrollbar.test | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/scrollbar.test b/tests/scrollbar.test index 8f92c93..6717deb 100644 --- a/tests/scrollbar.test +++ b/tests/scrollbar.test @@ -632,7 +632,7 @@ 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 { +test scrollbar-10.1 {<MouseWheel> event on scrollbar} -setup { destroy .t .s } -body { pack [text .t -yscrollcommand {.s set}] -side left @@ -647,6 +647,21 @@ test scrollbar-10.1 {<MouseWheel> event on scrollbar} -constraints win -setup { destroy .t .s } -result {2.0} +test scrollbar-10.2 {<MouseWheel> event on scrollbar} -setup { + destroy .t .s +} -body { + pack [text .t -xscrollcommand {.s set}] -side top + for {set i 1} {$i < 100} {incr i} {.t insert end "Char $i "} + pack [scrollbar .s -command {.t xview} -orient horizontal] -fill x -expand 1 -side top + update + focus -force .s + event generate .s <Shift-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} |