summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorhobbs <hobbs>2003-02-25 02:07:25 (GMT)
committerhobbs <hobbs>2003-02-25 02:07:25 (GMT)
commitd665260f8de4cab05575ab6784d8bc4f62a0cd54 (patch)
tree5bbcbe723f2c23a6f4558e3b491027f993b081c8 /tests
parent3cbdddcb83366ade6f30adef2061fcfb28acdb55 (diff)
downloadtk-d665260f8de4cab05575ab6784d8bc4f62a0cd54.zip
tk-d665260f8de4cab05575ab6784d8bc4f62a0cd54.tar.gz
tk-d665260f8de4cab05575ab6784d8bc4f62a0cd54.tar.bz2
* generic/tkListbox.c (ListboxSelectionSubCmd):
* tests/listbox.test: Allow 'selection includes' to respond when disabled (but only 'includes'). [Bug #632514]
Diffstat (limited to 'tests')
-rw-r--r--tests/listbox.test15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/listbox.test b/tests/listbox.test
index 5e69d64..37f5f30 100644
--- a/tests/listbox.test
+++ b/tests/listbox.test
@@ -6,7 +6,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: listbox.test,v 1.20 2002/07/14 05:48:46 dgp Exp $
+# RCS: @(#) $Id: listbox.test,v 1.21 2003/02/25 02:07:25 hobbs Exp $
package require tcltest 2.1
namespace import -force tcltest::configure
@@ -2132,6 +2132,19 @@ test listbox-28.3 {listbox -activestyle} {
.l cget -activestyle
} dotbox
+test listbox-29.1 {listbox selection behavior, -state disabled} {
+ destroy .l
+ listbox .l
+ .l insert end 1 2 3
+ .l selection set 2
+ set out [.l selection includes 2]
+ .l configure -state disabled
+ # still return 1 when disabled, because 'selection get' will work,
+ # but selection cannot be changed (new behavior since 8.4)
+ .l selection set 3
+ lappend out [.l selection includes 2] [.l curselection]
+} {1 1 2}
+
resetGridInfo
deleteWindows
option clear