diff options
author | fvogel <fvogelnew1@free.fr> | 2019-05-08 08:41:10 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2019-05-08 08:41:10 (GMT) |
commit | 590aacc76691cd115ffcd3a0b4643f5f53941cb8 (patch) | |
tree | 1383c68084b65eb1f480c669b2f696460a830db2 /tests/ttk | |
parent | c4bbfb925fae272f474e5c33bf19fd2107821838 (diff) | |
parent | d843a7eadb157bca482e150f7298e9cf3007c85c (diff) | |
download | tk-590aacc76691cd115ffcd3a0b4643f5f53941cb8.zip tk-590aacc76691cd115ffcd3a0b4643f5f53941cb8.tar.gz tk-590aacc76691cd115ffcd3a0b4643f5f53941cb8.tar.bz2 |
Fix [2513186fff], [f9343d8f72] and [8261c517af]: ttk scrolling (xview/yview commands) is incorrect until idle tasks are run
Diffstat (limited to 'tests/ttk')
-rw-r--r-- | tests/ttk/entry.test | 29 | ||||
-rw-r--r-- | tests/ttk/treeview.test | 12 |
2 files changed, 40 insertions, 1 deletions
diff --git a/tests/ttk/entry.test b/tests/ttk/entry.test index d303446..0ff0f2f 100644 --- a/tests/ttk/entry.test +++ b/tests/ttk/entry.test @@ -103,10 +103,37 @@ test entry-3.1 "bbox widget command" -body { test entry-3.2 "xview" -body { .e delete 0 end; .e insert end [string repeat "0" 40] - update idletasks set result [.e xview] } -result {0.0 0.5} +test entry-3.3 "xview" -body { + .e delete 0 end; + .e insert end abcdefghijklmnopqrstuvwxyz + .e xview end + set result [.e index @0] +} -result {7} + +test entry-3.4 "xview" -body { + .e delete 0 end; + .e insert end abcdefghijklmnopqrstuvwxyz + .e xview moveto 1.0 + set result [.e index @0] +} -result {7} + +test entry-3.5 "xview" -body { + .e delete 0 end; + .e insert end abcdefghijklmnopqrstuvwxyz + .e xview scroll 5 units + set result [.e index @0] +} -result {5} + +test entry-3.6 "xview" -body { + .e delete 0 end; + .e insert end [string repeat abcdefghijklmnopqrstuvwxyz 5] + .e xview scroll 2 pages + set result [.e index @0] +} -result {40} + test entry-3.last "Series 3 cleanup" -body { destroy .e } diff --git a/tests/ttk/treeview.test b/tests/ttk/treeview.test index be82f68..a36e3d1 100644 --- a/tests/ttk/treeview.test +++ b/tests/ttk/treeview.test @@ -471,6 +471,18 @@ test treeview-9.0 "scroll callback - empty tree" -body { set ::scrolldata } -result [list 0.0 1.0] +test treeview-9.1 "scrolling" -setup { + pack [ttk::treeview .tree -show tree] -fill y + for {set i 1} {$i < 100} {incr i} { + .tree insert {} end -text $i + } +} -body { + .tree yview scroll 5 units + .tree identify item 2 2 +} -cleanup { + destroy .tree +} -result {I006} + ### identify tests: # proc identify* {tv comps args} { |