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 | a74bdffd9369f2ed76ba90a5497e5a4f7b2475cd (patch) | |
tree | c6cb6b751f75c8a59e80f6d2d81e8a980cd0f293 /tests | |
parent | 3b7649bdc1d6357c2c3145879d0720493e784622 (diff) | |
download | tk-a74bdffd9369f2ed76ba90a5497e5a4f7b2475cd.zip tk-a74bdffd9369f2ed76ba90a5497e5a4f7b2475cd.tar.gz tk-a74bdffd9369f2ed76ba90a5497e5a4f7b2475cd.tar.bz2 |
Make test-case and binding equal for win32 and x11. Test-case doesn't pass yet
Diffstat (limited to 'tests')
-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} |