wm title . "Fileselectionbox Example" ## ## Supporting procedure ## to print the selection ## of the dir/file ## proc print {type} { if {[string match "file" $type]} { puts [file tail [.fsb get]] } else { puts [[.fsb component dirs] getcurselection] } return }; # end proc print ##========================================================= ## Create a Fileselectionbox iwidget ##========================================================= ## iwidgets::fileselectionbox .fsb \ -mask "*.html" \ -directory "../" \ -fileslabel "HTML Files" \ -dirslabel "Iwidgets HTML Dir" \ -selectdircommand {print dir} \ -selectfilecommand {print file} pack .fsb \ -fill both \ -expand true