Code:
Hello all:
Do anyone known how to pop up a dialog box for the user to select all and
one file and put all the name of the items to listbox or frame or label.
At the movement, my coding just can pop up a dialog box for the user to select one file from folder.
menu .mbar
. configure -menu .mbar
menu .mbar.file -tearoff 0
.mbar add cascade -label "File" -underline 0 -menu .mbar.file
.mbar.file add command -label "Open" -underline 0 -command openFile
proc openFile {} {
set filename [tk_getOpenFile]
set thefile [open $filename r]
set filecontent [read $thefile]
close $thefile
}