summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordas <das@noemail.net>2007-05-30 13:24:01 (GMT)
committerdas <das@noemail.net>2007-05-30 13:24:01 (GMT)
commit795ebe74b7d4283df0c9282d98671e5c00e70857 (patch)
tree33559f3efc9ec1a14205b11dc652ce76069de957
parent5db9ddffd10f55389402bb9ad30106700b3447cd (diff)
downloadtk-795ebe74b7d4283df0c9282d98671e5c00e70857.zip
tk-795ebe74b7d4283df0c9282d98671e5c00e70857.tar.gz
tk-795ebe74b7d4283df0c9282d98671e5c00e70857.tar.bz2
replace previous inoperative commit with direct setting of highlightbackground on all buttons
FossilOrigin-Name: c3cbf65aae5485352830fec0100bf701a56c67ce
-rw-r--r--library/demos/button.tcl11
1 files changed, 9 insertions, 2 deletions
diff --git a/library/demos/button.tcl b/library/demos/button.tcl
index eb73408..ef01e66 100644
--- a/library/demos/button.tcl
+++ b/library/demos/button.tcl
@@ -3,7 +3,7 @@
# This demonstration script creates a toplevel window containing
# several button widgets.
#
-# RCS: @(#) $Id: button.tcl,v 1.2.26.1 2007/05/30 06:37:03 das Exp $
+# RCS: @(#) $Id: button.tcl,v 1.2.26.2 2007/05/30 13:24:01 das Exp $
if {![info exists widgetDemo]} {
error "This script should be run from the \"widget\" demo."
@@ -29,7 +29,14 @@ proc colorrefresh {w col} {
$w configure -bg $col
$w.buttons configure -bg $col
if {[tk windowingsystem] eq "aqua"} {
- $w.buttons configure -highlightbackground $col
+ # set highlightbackground of all buttons in $w
+ set l [list $w]
+ while {[llength $l]} {
+ set l [concat [lrange $l 1 end] [winfo children [set b [lindex $l 0]]]]
+ if {[winfo class $b] eq "Button"} {
+ $b configure -highlightbackground $col
+ }
+ }
}
}