summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorericm <ericm>2000-05-25 16:57:23 (GMT)
committerericm <ericm>2000-05-25 16:57:23 (GMT)
commit1154932c72abbeb2e99ff4037f5fcfabe778a89b (patch)
treeb0f58532831951ab7b8a8bf2126ebea85f408697 /library
parente738a8c0b81557adfe941a8ea6765de709cb65a8 (diff)
downloadtk-1154932c72abbeb2e99ff4037f5fcfabe778a89b.zip
tk-1154932c72abbeb2e99ff4037f5fcfabe778a89b.tar.gz
tk-1154932c72abbeb2e99ff4037f5fcfabe778a89b.tar.bz2
* doc/radiobutton.n: Added documentation for -overrelief option.
* doc/checkbutton.n: Added documentation for -overrelief option. * doc/label.n: Added documentation for -state option. * generic/tkButton.c: Added -overrelief option for checkbuttons, and radiobuttons. * library/button.tcl (tkButtonDown, macintosh version): Added protection against querying the -repeatdelay option from a widget that doesn't support it (ie, checkbuttons, radiobuttons, etc). Other platforms use a different binding script for checkbuttons and radiobuttons, so they don't have this issue. (tkCheckRadioEnter, windows version): Added code to handle -overrelief for check/radiobuttons on windows.
Diffstat (limited to 'library')
-rw-r--r--library/button.tcl16
1 files changed, 11 insertions, 5 deletions
diff --git a/library/button.tcl b/library/button.tcl
index fddccc6..bccd232 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.8 2000/05/17 21:17:21 ericm Exp $
+# RCS: @(#) $Id: button.tcl,v 1.9 2000/05/25 16:57:24 ericm Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
@@ -198,6 +198,10 @@ proc tkCheckRadioEnter w {
if {[string compare [$w cget -state] "disabled"] \
&& [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]
+ }
}
set tkPriv(window) $w
}
@@ -496,10 +500,12 @@ proc tkButtonDown w {
# If this button has a repeatdelay set up, get it going with an after
after cancel $tkPriv(afterId)
- set delay [$w cget -repeatdelay]
- set tkPriv(repeated) 0
- if {$delay > 0} {
- set tkPriv(afterId) [after $delay [list tkButtonAutoInvoke $w]]
+ if { ![catch {$w cget -repeatdelay} delay] } {
+ set delay [$w cget -repeatdelay]
+ set tkPriv(repeated) 0
+ if {$delay > 0} {
+ set tkPriv(afterId) [after $delay [list tkButtonAutoInvoke $w]]
+ }
}
}
}