summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--library/button.tcl14
2 files changed, 11 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index ce7c07a..6797c4f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2000-05-25 Eric Melski <ericm@scriptics.com>
+ * library/button.tcl: Tweaks for -overrelief handling on Windows.
+
* doc/radiobutton.n: Added documentation for -overrelief option.
* doc/checkbutton.n: Added documentation for -overrelief option.
diff --git a/library/button.tcl b/library/button.tcl
index bccd232..457b545 100644
--- a/library/button.tcl
+++ b/library/button.tcl
@@ -4,7 +4,7 @@
# checkbutton, and radiobutton widgets and provides procedures
# that help in implementing those bindings.
#
-# RCS: @(#) $Id: button.tcl,v 1.9 2000/05/25 16:57:24 ericm Exp $
+# RCS: @(#) $Id: button.tcl,v 1.10 2000/05/25 17:19:57 ericm Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
@@ -195,9 +195,10 @@ proc tkButtonLeave w {
proc tkCheckRadioEnter w {
global tkPriv
- if {[string compare [$w cget -state] "disabled"] \
- && [string equal $tkPriv(buttonWindow) $w]} {
- $w configure -state active
+ if {[string compare [$w cget -state] "disabled"]} {
+ if {[string equal $tkPriv(buttonWindow) $w]} {
+ $w configure -state active
+ }
if { [string compare [$w cget -overrelief] ""] } {
set tkPriv(relief) [$w cget -relief]
$w configure -relief [$w cget -overrelief]
@@ -250,9 +251,12 @@ proc tkButtonDown w {
proc tkCheckRadioDown w {
global tkPriv
- set tkPriv(relief) [$w cget -relief]
+ if { [string equal [$w cget -overrelief] ""] } {
+ set tkPriv(relief) [$w cget -relief]
+ }
if {[string compare [$w cget -state] "disabled"]} {
set tkPriv(buttonWindow) $w
+ set tkPriv(repeated) 0
$w configure -state active
}
}