diff options
Diffstat (limited to 'library/demos/button.tcl')
-rw-r--r-- | library/demos/button.tcl | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/library/demos/button.tcl b/library/demos/button.tcl index 5833fd0..6bde4ba 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.7 2007/10/15 21:06:16 dkf Exp $ +# RCS: @(#) $Id: button.tcl,v 1.8 2007/10/17 18:21:49 das Exp $ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." @@ -26,6 +26,16 @@ pack [addSeeDismiss $w.buttons $w] -side bottom -fill x proc colorrefresh {w col} { $w configure -bg $col + if {[tk windowingsystem] eq "aqua"} { + # set highlightbackground of all buttons in $w + set l [list $w] + while {[llength $l]} { + set l [concat [lassign $l b] [winfo children $b]] + if {[winfo class $b] eq "Button"} { + $b configure -highlightbackground $col + } + } + } } button $w.b1 -text "Peach Puff" -width 10 \ |