NAME
FileSelect - a widget for choosing files
use Tk::FileSelect;
$FSref = $top->FileSelect(-directory => $start_dir);
This Module pops up a Fileselector box, with a directory entry on top, a list of directories in the current directory, a list of files in the current directory, an entry for entering/modifying a file name, an accept button and a cancel button.
You can enter a starting directory in the directory entry. After hitting Return, the listboxes get updated. Double clicking on any directory shows you the respective contents. Single clicking on a file brings it into the file entry for further consideration, double clocking on a file pops down the file selector and calls the optional command with the complete path for the selected file. Hitting return in the file selector box or pressing the accept button will also work. *NOTE* the file selector box will only then get destroyed if the file name is not zero length. If you want yourself take care of it, change the if(length(.. in sub accept_file.
AUTHORS
Based on original FileSelect by Klaus Lichtenwalder, Lichtenwalder@ACM.org, Datapat GmbH, Munich, April 22, 1995 adapted by Frederick L. Wagner, derf@ti.com, Texas Instruments Incorporated, Dallas, 21Jun95
HISTORY
950621 -- The following changes were made:
Option Controls Default ------------------- ----------------------------------- ------------ -directory initial directory `pwd` -selectmode mode of Files listbox browse -dir_entry_label label over directory filter entry "Filter" -dir_list_label label over directory listbox "Directories" -file_entry_label label over file entry "File" -file_list_label label over file listbox "Files" -height listbox height 20 -width listbox width 20