Example: File Viewer (3)
proc TreeBrowse {dir} {
global stlist
set tlist [$stlist subwidget tlist]
$tlist delete 0 end
cd $dir
set files [lsort [glob -nocomplain *]]
foreach file $files {
if [file isdirectory $file] {
$tlist insert end -itemtype imagetext \
-image [tix getimage folder] -text $file
}
}