diff options
author | donal.k.fellows@manchester.ac.uk <dkf> | 2009-12-16 13:20:18 (GMT) |
---|---|---|
committer | donal.k.fellows@manchester.ac.uk <dkf> | 2009-12-16 13:20:18 (GMT) |
commit | 8d4e6afe22d69d2598c91cbef64f8d57b702785f (patch) | |
tree | 7fe420a4dd7b67e12481cfc84abb5516ef1fa7a5 /library/demos | |
parent | c57185637af68015468e6316ad386e6c7a795b68 (diff) | |
download | tk-8d4e6afe22d69d2598c91cbef64f8d57b702785f.zip tk-8d4e6afe22d69d2598c91cbef64f8d57b702785f.tar.gz tk-8d4e6afe22d69d2598c91cbef64f8d57b702785f.tar.bz2 |
Rename variable to avoid clash with floorplan demo. Reported by
Emiliano Gavilan.
Diffstat (limited to 'library/demos')
-rw-r--r-- | library/demos/ttkscale.tcl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/demos/ttkscale.tcl b/library/demos/ttkscale.tcl index 13e2c4d..dbd09a3 100644 --- a/library/demos/ttkscale.tcl +++ b/library/demos/ttkscale.tcl @@ -2,7 +2,7 @@ # # This demonstration script shows an example with a horizontal scale. # -# RCS: @(#) $Id: ttkscale.tcl,v 1.2 2009/12/10 11:48:38 dkf Exp $ +# RCS: @(#) $Id: ttkscale.tcl,v 1.3 2009/12/16 13:20:18 dkf Exp $ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." @@ -30,10 +30,10 @@ ttk::frame $w.frame -borderwidth 10 pack $w.frame -side top -fill x # List of colors from rainbox; "Indigo" is not a standard color -set colors {Red Orange Yellow Green Blue Violet} +set colorList {Red Orange Yellow Green Blue Violet} ttk::label $w.frame.label ttk::scale $w.frame.scale -from 0 -to 5 -command [list apply {{w idx} { - set c [lindex $::colors [tcl::mathfunc::int $idx]] + set c [lindex $::colorList [tcl::mathfunc::int $idx]] $w.frame.label configure -foreground $c -text "Color: $c" }} $w] # Trigger the setting of the label's text |