1 #!/home/people/tkys/Eos/util/HP/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] -button 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.TileOffset yes
31 #option add *forceGadgets no
32 #option add *Hierbox.openCommand {
33 # AddDirEntries %W "$top/%P"
36 #option add *Hierbox.closeCommand {
37 # eval %W delete %n 0 end
40 option add *icons "normalIcon activeIcon"
45 -yscrollcommand { .vs set } \
46 -xscrollcommand { .hs set }
48 scrollbar .vs -orient vertical -command { .h yview }
49 scrollbar .hs -orient horizontal -command { .h xview }
50 button .test -text Test -command {
51 set index [.h curselection]
52 set names [eval .h get -full $index]
53 puts "selected names are $names"
61 table configure . c1 r1 r2 -resize none
64 .h configure -separator "/" -trim $top -autocreate yes
65 #.h entry configure 0 -label [file tail $top]
67 catch { exec du $top } files
68 foreach f [split $files \n ] {
69 .h insert end [lindex $f 1] -text [lindex $f 0] -button auto