LablTk: getOpenFile

Dialog box to display a directory.
The button calls Tk.getOpenFile, which popups a dialog box
containing the names of the files in directory specified by the argument initialdir.
It returns the name of the file entered by the user, and displays a warning
if the user enters the name of a non-existing file.
   

The file name is usually given to a routine to open the file (open_in).

Here is the dialog box I get
when I press "Open File".

The default option for initialdir is ".",
i.e. the current directory.

I can specify the argument defaultextension,
which will serve to complete the file name.
For instance, specifying ".html" as the default extension,
I can enter "basics", and the programme will understand
"basics.html" since I have such a file in the directory.




   




François Thomasset -- INRIA, Rocquencourt -- November 2007
Email: Francois dot Thomasset at inria dot fr