diff options
author | jenglish <jenglish@noemail.net> | 2008-02-23 18:41:02 (GMT) |
---|---|---|
committer | jenglish <jenglish@noemail.net> | 2008-02-23 18:41:02 (GMT) |
commit | d55650f5650a0d3ef372a59e6d4dacfeefd56301 (patch) | |
tree | 44fd63fc0f348539a846a76e241e28776afe8f62 /tests/ttk | |
parent | ad346bfdd2e093d742c41ed3abb21b9495cf4b88 (diff) | |
download | tk-d55650f5650a0d3ef372a59e6d4dacfeefd56301.zip tk-d55650f5650a0d3ef372a59e6d4dacfeefd56301.tar.gz tk-d55650f5650a0d3ef372a59e6d4dacfeefd56301.tar.bz2 |
Arrange to deliver <<ComboboxSelected>> event after listbox is unposted,
as intended [Bug 1890211]. Clarified documentation.
FossilOrigin-Name: 448844d29f1256fc5bdf5e2063436d2da7e4dade
Diffstat (limited to 'tests/ttk')
-rw-r--r-- | tests/ttk/combobox.test | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/tests/ttk/combobox.test b/tests/ttk/combobox.test index 3c20bd3..8f25a81 100644 --- a/tests/ttk/combobox.test +++ b/tests/ttk/combobox.test @@ -1,5 +1,5 @@ # -# Tile package: combobox widget tests +# ttk::combobox widget tests # package require Tk 8.5 @@ -43,6 +43,26 @@ test combobox-2.4 "current -- value not in list" -body { .cb current } -result -1 -test combobox-end "Cleanup" -body { destroy .cb } +test combobox-2.end "Cleanup" -body { destroy .cb } + + +test combobox-1890211 "ComboboxSelected event after listbox unposted" -body { + # whitebox test... + pack [ttk::combobox .cb -values [list a b c]] + set result [list] + bind .cb <<ComboboxSelected>> { + lappend result Event [winfo ismapped .cb.popdown] [.cb get] + } + lappend result Start 0 [.cb get] + ttk::combobox::Post .cb + lappend result Post [winfo ismapped .cb.popdown] [.cb get] + .cb.popdown.l selection clear 0 end; .cb.popdown.l selection set 1 + ttk::combobox::LBSelected .cb.popdown.l + lappend result Select [winfo ismapped .cb.popdown] [.cb get] + update + set result +} -result [list Start 0 {} Post 1 {} Select 0 b Event 0 b] -cleanup { + destroy .cb +} tcltest::cleanupTests |