diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2003-11-03 15:30:45 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2003-11-03 15:30:45 (GMT) |
commit | c0164ce633713cc59b867c0a5b713be33fa51593 (patch) | |
tree | 85e4cc9231f1d3d491a3a13dfe56c421c2572707 /library/demos/ruler.tcl | |
parent | 2850c445d0a092a29a4bb8fc7872bdf1b8e77013 (diff) | |
download | tk-c0164ce633713cc59b867c0a5b713be33fa51593.zip tk-c0164ce633713cc59b867c0a5b713be33fa51593.tar.gz tk-c0164ce633713cc59b867c0a5b713be33fa51593.tar.bz2 |
Make demo location independent of main Tk library location. [Patch 832691]
Diffstat (limited to 'library/demos/ruler.tcl')
-rw-r--r-- | library/demos/ruler.tcl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/library/demos/ruler.tcl b/library/demos/ruler.tcl index 02f7c06..0f5359d 100644 --- a/library/demos/ruler.tcl +++ b/library/demos/ruler.tcl @@ -3,7 +3,7 @@ # This demonstration script creates a canvas widget that displays a ruler # with tab stops that can be set, moved, and deleted. # -# RCS: @(#) $Id: ruler.tcl,v 1.4 2003/08/20 23:02:18 hobbs Exp $ +# RCS: @(#) $Id: ruler.tcl,v 1.5 2003/11/03 15:31:18 dkf Exp $ if {![info exists widgetDemo]} { error "This script should be run from the \"widget\" demo." @@ -24,7 +24,6 @@ proc rulerMkTab {c x y} { } set w .ruler -global tk_library catch {destroy $w} toplevel $w wm title $w "Ruler Demonstration" @@ -49,14 +48,15 @@ set demo_rulerInfo(top) [winfo fpixels $c 1c] set demo_rulerInfo(bottom) [winfo fpixels $c 1.5c] set demo_rulerInfo(size) [winfo fpixels $c .2c] set demo_rulerInfo(normalStyle) "-fill black" +# Main widget program sets variable tk_demoDirectory if {[winfo depth $c] > 1} { set demo_rulerInfo(activeStyle) "-fill red -stipple {}" set demo_rulerInfo(deleteStyle) [list -fill red \ - -stipple @[file join $tk_library demos images gray25.bmp]] + -stipple @[file join $tk_demoDirectory images gray25.bmp]] } else { set demo_rulerInfo(activeStyle) "-fill black -stipple {}" set demo_rulerInfo(deleteStyle) [list -fill black \ - -stipple @[file join $tk_library demos images gray25.bmp]] + -stipple @[file join $tk_demoDirectory images gray25.bmp]] } $c create line 1c 0.5c 1c 1c 13c 1c 13c 0.5c -width 1 |