summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorfvogelnew1@free.fr <fvogel>2016-01-06 20:28:27 (GMT)
committerfvogelnew1@free.fr <fvogel>2016-01-06 20:28:27 (GMT)
commit9f6fd86a5a54cfa2bbbe64f545ba59b4238a18a5 (patch)
treee722c2cc7c734b1e6a496ddaf9548197537d28f8 /tests
parentb55dbda30736e1a58e7ca356595be5d34b0cf8a0 (diff)
parentb12ea9d1625fb1b6099d0e543e2797e02ffbf98c (diff)
downloadtk-9f6fd86a5a54cfa2bbbe64f545ba59b4238a18a5.zip
tk-9f6fd86a5a54cfa2bbbe64f545ba59b4238a18a5.tar.gz
tk-9f6fd86a5a54cfa2bbbe64f545ba59b4238a18a5.tar.bz2
Fixed bug [3102228] - <<ListboxSelect>> doesn't fire when selection lost
Diffstat (limited to 'tests')
-rw-r--r--tests/listbox.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/listbox.test b/tests/listbox.test
index b01652b..62b8cc1 100644
--- a/tests/listbox.test
+++ b/tests/listbox.test
@@ -2193,6 +2193,21 @@ test listbox-31.1 {<<ListboxSelect>> event} -setup {
unset -nocomplain res
} -result {0 2 1}
+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