summaryrefslogtreecommitdiffstats
path: root/tests/listbox.test
diff options
context:
space:
mode:
authorfvogel <fvogel@noemail.net>2015-12-31 13:50:50 (GMT)
committerfvogel <fvogel@noemail.net>2015-12-31 13:50:50 (GMT)
commita1a0dc67c4e4bcda5093da1df6355b46f0e40bae (patch)
treec3d33b35e54683ce7bd8b5465f49e120b057b53f /tests/listbox.test
parent88a2ec52c0403f619ded36af5e0fa7ecb7e0d356 (diff)
downloadtk-a1a0dc67c4e4bcda5093da1df6355b46f0e40bae.zip
tk-a1a0dc67c4e4bcda5093da1df6355b46f0e40bae.tar.gz
tk-a1a0dc67c4e4bcda5093da1df6355b46f0e40bae.tar.bz2
Fixed bug [3102228] - <<ListboxSelect>> doesn't fire when selection lost
FossilOrigin-Name: 4afc37da90142c80b5059dea693df196574e88cf
Diffstat (limited to 'tests/listbox.test')
-rw-r--r--tests/listbox.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/listbox.test b/tests/listbox.test
index b4046b6..7952abd 100644
--- a/tests/listbox.test
+++ b/tests/listbox.test
@@ -2169,6 +2169,21 @@ test listbox-30.1 {Bug 3607326} -setup {
unset -nocomplain a
} -result * -match glob -returnCodes error
+test listbox-31.2 {<<ListboxSelect>> event on lost selection} -setup {
+ destroy .l
+} -body {
+ pack [listbox .l -exportselection true]
+ update
+ bind .l <<ListboxSelect>> {lappend res [list [selection own] [%W curselection]]}
+ .l insert end a b c
+ focus -force .l
+ event generate .l <1> -x 5 -y 5 ; # <<ListboxSelect>> fires
+ selection clear ; # <<ListboxSelect>> fires again
+ set res
+} -cleanup {
+ destroy .l
+} -result {{.l 0} {{} {}}}
+
resetGridInfo
deleteWindows
option clear