diff options
author | fvogel <fvogelnew1@free.fr> | 2020-04-18 17:10:09 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2020-04-18 17:10:09 (GMT) |
commit | 37be1cea7bd233677e375d54d95a72e5d9f70247 (patch) | |
tree | cedebb1ace23bd359d42659e8978dacd81d561ab /tests | |
parent | 084ab3a3855d26eaef4e15d63fed53ddb256decf (diff) | |
download | tk-37be1cea7bd233677e375d54d95a72e5d9f70247.zip tk-37be1cea7bd233677e375d54d95a72e5d9f70247.tar.gz tk-37be1cea7bd233677e375d54d95a72e5d9f70247.tar.bz2 |
Add new test case treeview-9.3 exercising scrollbar change on 'see' command for an item whose ancestors are closed
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ttk/treeview.test | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/ttk/treeview.test b/tests/ttk/treeview.test index 144f6d9..0ad0443 100644 --- a/tests/ttk/treeview.test +++ b/tests/ttk/treeview.test @@ -534,6 +534,34 @@ test treeview-9.2 {scrolling on see command - bug [14188104c3]} -setup { destroy .top } -result {0.0 1.0 1} +test treeview-9.3 {scrolling on see command, requested item is closed} -setup { + toplevel .top + ttk::treeview .top.tree -show tree -height 10 -columns {label} \ + -yscrollcommand [list .top.vs set] + ttk::scrollbar .top.vs -command {.top.tree yview} + grid .top.tree -row 0 -column 0 -sticky ns + grid .top.vs -row 0 -column 1 -sticky ns + + .top.tree insert {} end -id a -text a + .top.tree insert a end -id b -text b + .top.tree insert b end -id c -text c + .top.tree insert c end -id d -text d + .top.tree insert d end -id e -text e + for {set i 6} {$i <= 15} {incr i} { + .top.tree insert {} end -id row$i \ + -values [list [format "Row %2.2d" $i]] + } + update +} -body { + set before [lindex [.top.vs get] 1] + .top.tree see e + update idletasks + set after [lindex [.top.vs get] 1] + expr $after < $before +} -cleanup { + destroy .top +} -result {1} + ### identify tests: # proc identify* {tv comps args} { |