diff options
author | hobbs <hobbs> | 2001-12-28 23:03:23 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2001-12-28 23:03:23 (GMT) |
commit | 82ae4f2ce4ccb362fd0914afdfa1ba7b4e6903a0 (patch) | |
tree | c1e316789e5d1d4ffd72c544ea6a8aecfb750100 | |
parent | 6128891597110248fe8022888de17b95e3f5a38e (diff) | |
download | tk-82ae4f2ce4ccb362fd0914afdfa1ba7b4e6903a0.zip tk-82ae4f2ce4ccb362fd0914afdfa1ba7b4e6903a0.tar.gz tk-82ae4f2ce4ccb362fd0914afdfa1ba7b4e6903a0.tar.bz2 |
* library/text.tcl (tk::TextButton1): made text receive focus even
in disabled state for Windows to show selection and allow
mouse-wheel scrolling.
-rw-r--r-- | library/text.tcl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/library/text.tcl b/library/text.tcl index 988466d..928b61c 100644 --- a/library/text.tcl +++ b/library/text.tcl @@ -3,7 +3,7 @@ # This file defines the default bindings for Tk text widgets and provides # procedures that help in implementing the bindings. # -# RCS: @(#) $Id: text.tcl,v 1.19 2001/12/27 22:26:41 hobbs Exp $ +# RCS: @(#) $Id: text.tcl,v 1.20 2001/12/28 23:03:23 hobbs Exp $ # # Copyright (c) 1992-1994 The Regents of the University of California. # Copyright (c) 1994-1997 Sun Microsystems, Inc. @@ -523,7 +523,10 @@ proc ::tk::TextButton1 {w x y} { set Priv(pressX) $x $w mark set insert [TextClosestGap $w $x $y] $w mark set anchor insert - if {[string equal [$w cget -state] "normal"]} {focus $w} + # Allow focus in any case on Windows, because that will let the + # selection be displayed even for state disabled text widgets. + if {[string equal $::tcl_platform(platform) "windows"] \ + || [string equal [$w cget -state] "normal"]} {focus $w} if {[$w cget -autoseparators]} {$w edit separator} } |