From b1ecdd6bed804198c1cb6a6af95704954f4345ee Mon Sep 17 00:00:00 2001 From: ericm Date: Thu, 25 May 2000 17:19:56 +0000 Subject: * library/button.tcl: Tweaks for -overrelief handling on Windows. --- ChangeLog | 2 ++ library/button.tcl | 14 +++++++++----- 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 + * 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 } } -- cgit v0.12