summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorericm <ericm>2000-05-14 20:45:36 (GMT)
committerericm <ericm>2000-05-14 20:45:36 (GMT)
commitfb29a6c87e4505a9ba03eaad1248cecd64640960 (patch)
tree37a41246252550f624c788dc529937a909684f60 /library
parentbfa082e9202bf219a84a4bb0d997d6cf1f834516 (diff)
downloadtk-fb29a6c87e4505a9ba03eaad1248cecd64640960.zip
tk-fb29a6c87e4505a9ba03eaad1248cecd64640960.tar.gz
tk-fb29a6c87e4505a9ba03eaad1248cecd64640960.tar.bz2
* library/entry.tcl: Adjusted Button-1 binding to set focus to the
entry when it is readonly or normal. * doc/entry.n: Added documentation for readonly state, -disabledforeground, -disabledbackground. * tests/entry.test: Added tests for readonly state. * generic/tkEntry.c: Added support for "readonly" state, and redefined "disabled" state. A disabled entry will display its text in a dimmed color and possibly with a different background, and will be completely unusable (no selection, no editing). A readonly entry will look like a normal entry, but it will not be editable; selection is still allowed. [RFE: 4239]. To support the new disabled state properly, "-disabledforeground" and "-disabledbackground" options were added. *** THIS IS A BACKWARDS INCOMPATIBLE BEHAVIOR CHANGE *** * win/tkWinDefault.h: * mac/tkMacDefault.h: * unix/tkUnixDefault.h: Added DEF_ENTRY_DISABLED_FG, DEF_ENTRY_DISABLED_BG_COLOR, DEF_ENTRY_DISABLED_BG_MONO.
Diffstat (limited to 'library')
-rw-r--r--library/entry.tcl4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/entry.tcl b/library/entry.tcl
index 9e51397..a46561e 100644
--- a/library/entry.tcl
+++ b/library/entry.tcl
@@ -3,7 +3,7 @@
# This file defines the default bindings for Tk entry widgets and provides
# procedures that help in implementing those bindings.
#
-# RCS: @(#) $Id: entry.tcl,v 1.11 2000/01/06 02:22:24 hobbs Exp $
+# RCS: @(#) $Id: entry.tcl,v 1.12 2000/05/14 20:45:38 ericm Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -336,7 +336,7 @@ proc tkEntryButton1 {w x} {
set tkPriv(pressX) $x
$w icursor [tkEntryClosestGap $w $x]
$w selection from insert
- if {[string equal [$w cget -state] "normal"]} {focus $w}
+ if {[string compare [$w cget -state] "disabled"]} {focus $w}
}
# tkEntryMouseSelect --