summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2016-01-06 20:18:16 (GMT)
committerfvogel <fvogelnew1@free.fr>2016-01-06 20:18:16 (GMT)
commita5debf9a0dd31acedd2957d53a9afcba130f0fd8 (patch)
tree5abf52f710dbb9d872e57fa6a20423809cb62858 /tests
parent358958a850b2d6dade3b1ade688f584e2cd9a940 (diff)
parent660224054561099ac0416a6486f6c4cfb2aee4ea (diff)
downloadtk-a5debf9a0dd31acedd2957d53a9afcba130f0fd8.zip
tk-a5debf9a0dd31acedd2957d53a9afcba130f0fd8.tar.gz
tk-a5debf9a0dd31acedd2957d53a9afcba130f0fd8.tar.bz2
Fixed bug [1288433] - LisboxSelect event triggers when listbox state is disabled
Diffstat (limited to 'tests')
-rw-r--r--tests/listbox.test24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/listbox.test b/tests/listbox.test
index e05d574..01a8e7a 100644
--- a/tests/listbox.test
+++ b/tests/listbox.test
@@ -3068,6 +3068,30 @@ test listbox-30.1 {Bug 3607326} -setup {
unset -nocomplain a
} -result * -match glob -returnCodes error
+test listbox-31.1 {<<ListboxSelect>> event} -setup {
+ destroy .l
+ unset -nocomplain res
+} -body {
+ pack [listbox .l -state normal]
+ update
+ bind .l <<ListboxSelect>> {lappend res [%W curselection]}
+ .l insert end a b c
+ focus -force .l
+ event generate .l <1> -x 5 -y 5 ; # <<ListboxSelect>> fires
+ .l configure -state disabled
+ focus -force .l
+ event generate .l <Control-Home> ; # <<ListboxSelect>> does NOT fire
+ .l configure -state normal
+ focus -force .l
+ event generate .l <Control-End> ; # <<ListboxSelect>> fires
+ .l selection clear 0 end ; # <<ListboxSelect>> does NOT fire
+ .l selection set 1 1 ; # <<ListboxSelect>> does NOT fire
+ lappend res [.l curselection]
+} -cleanup {
+ destroy .l
+ unset -nocomplain res
+} -result {0 2 1}
+
resetGridInfo
deleteWindows
option clear