#267 tk_getOpenFile in tcl/tk.

set types {
        {"All Source Files"     {.tcl}    }
        {"Image Files"          {.txt}          }
        {"All files"            *}
}

proc doIt {label} {
    global types   
    set file [tk_getOpenFile -filetypes $types -parent .]
    $label configure -text $file
}

label .l -text "No File"
button .b -text "Select a file?" \
        -command "doIt .l"

grid .b -row 0 -column 0
grid .l -row 0 -column 1