1 #!/home/people/tkys/Eos/util/SGI/bin/bltwish
6 proc AddDirEntries { w dir } {
7 if { [file isdirectory $dir] } {
8 set files [glob -nocomplain $dir/*]
9 eval $w insert end [lsort $files]
10 set subdirs [glob -nocomplain $dir/*/]
11 eval $w entry configure [lsort $subdirs] -gadget yes
15 image create photo activeIcon -file ./images/ofolder.gif
16 image create photo normalIcon -file ./images/folder.gif
18 image create photo openGadget -file ./images/mini-book2.gif
19 image create photo closeGadget -file ./images/mini-book1.gif
21 image create photo bgTexture -file ./images/rain.gif
24 foreach f [glob ./images/mini-*.gif] {
25 lappend imageList [image create photo -file $f]
28 #option add *Hierbox.Tile bgTexture
29 option add *Hierbox.ScrollTile yes
30 option add *Hierbox.cursor crosshair
32 option add *icons "normalIcon activeIcon"
35 -yscrollcommand { .vs set } \
36 -xscrollcommand { .hs set } \
37 -activebackground lightskyblue1 \
38 -selectbackground lightskyblue2
41 scrollbar .vs -orient vertical -command { .h yview }
42 scrollbar .hs -orient horizontal -command { .h xview }
43 button .test -text Test -command {
44 set index [.h curselection]
45 set names [eval .h get -full $index]
46 puts "selected names are $names"
55 table configure . c1 r1 -resize none
57 .h configure -autocreate yes
59 .h insert end { The Quick Brown Fox Jumped Over the }
60 .h entry configure root -label {[Root]}