summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjenglish <jenglish@flightlab.com>2008-02-23 18:41:03 (GMT)
committerjenglish <jenglish@flightlab.com>2008-02-23 18:41:03 (GMT)
commit6654ca14fff1fe29caf02e626fb790df3104bd91 (patch)
tree44fd63fc0f348539a846a76e241e28776afe8f62 /tests
parent0c1706a93153b2af96989598d81c96c8ad692fb9 (diff)
downloadtk-6654ca14fff1fe29caf02e626fb790df3104bd91.zip
tk-6654ca14fff1fe29caf02e626fb790df3104bd91.tar.gz
tk-6654ca14fff1fe29caf02e626fb790df3104bd91.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.test24
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