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 { .tnb view } -orient horizontal
38 -relief sunken -bd 2 \
40 -samewidth yes -tiers 2 -slant right \
41 -scrollcommand { .s set } \
44 label .tnb.l -image testImage
47 graph1 "Graph \#1" red .tnb.graph1
48 graph2 "Graph \#2" green .tnb.graph2
49 graph3 "Graph \#3" cyan .tnb.graph3
50 graph5 "Graph \#5" yellow .tnb.graph5
51 graph6 one orange .tnb.l
54 foreach { entry label color window } $attributes {
55 .tnb insert end -text $label -fill both
58 foreach label { there bunky another test of a widget } {
59 set id [.tnb insert end -text $label]
62 .tnb tab configure $id -image label2
68 table configure . r1 -resize none
71 foreach file { graph1 graph2 graph3 graph5 } {
73 source scripts/$file.tcl
74 .tnb tab configure $index -window $graph