5 # --------------------------------------------------------------------------
6 # Starting with Tcl 8.x, the BLT commands are stored in their own
7 # namespace called "blt". The idea is to prevent name clashes with
8 # Tcl commands and variables from other packages, such as a "table"
9 # command in two different packages.
11 # You can access the BLT commands in a couple of ways. You can prefix
12 # all the BLT commands with the namespace qualifier "blt::"
15 # blt::table . .g -resize both
17 # or you can import all the command into the global namespace.
19 # namespace import blt::*
21 # table . .g -resize both
23 # --------------------------------------------------------------------------
25 if { $tcl_version >= 8.0 } {
26 namespace import blt::*
27 namespace import -force blt::tile::*
29 source scripts/demo.tcl
31 image create photo bgTile -file ./images/smblue_rock.gif
32 image create photo label1 -file ./images/mini-book1.gif
33 image create photo label2 -file ./images/mini-book2.gif
34 image create photo testImage -file ./images/txtrflag.gif
36 scrollbar .s -command { .t view } -orient horizontal
38 -relief sunken -bd 2 \
40 -samewidth yes -tiers 2 -slant right \
41 -scrollcommand { .s set } \
44 label .t.l -image testImage
47 graph1 "Graph \#1" red .t.graph1
48 graph2 "Graph \#2" green .t.graph2
49 graph3 "Graph \#3" cyan .t.graph3
50 graph5 "Graph \#5" yellow .t.graph5
51 graph6 one orange .t.l
54 foreach { entry label color window } $attributes {
55 .t insert end -text $label -fill both
58 foreach label { there bunky another test of a widget } {
59 set id [.t insert end -text $label]
62 set img [image create photo -file ./images/blt98.gif]
63 .t tab configure $id -image label2 -tile $img
69 table configure . r1 -resize none
72 foreach file { graph1 graph2 graph3 graph5 } {
73 namespace eval $file {
74 set graph [graph .t.$file]
75 source scripts/$file.tcl
76 .t tab configure $index -window $graph