diff options
author | jenglish@flightlab.com <jenglish> | 2008-02-23 18:41:03 (GMT) |
---|---|---|
committer | jenglish@flightlab.com <jenglish> | 2008-02-23 18:41:03 (GMT) |
commit | 084e0d4304d68bf0207baf8fbc0cce90fa692e94 (patch) | |
tree | 44fd63fc0f348539a846a76e241e28776afe8f62 /tests | |
parent | db3055b06976feb2b86c45555e8a614b048dbc24 (diff) | |
download | tk-084e0d4304d68bf0207baf8fbc0cce90fa692e94.zip tk-084e0d4304d68bf0207baf8fbc0cce90fa692e94.tar.gz tk-084e0d4304d68bf0207baf8fbc0cce90fa692e94.tar.bz2 |
Arrange to deliver <<ComboboxSelected>> event after listbox is unposted,
as intended [Bug 1890211]. Clarified documentation.
Diffstat (limited to 'tests')
-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 |