srikrishnan has asked for the wisdom of the Perl Monks concerning the following question:
Dear Friends,
I have created a simple UI in my perl script with perl/Tk. All things works perfectly except one odd thing.
i.e.
I have used "getOpenFile" dialog box for prompting the file from user. In this I have made option for selecting two file types, say e.g. ".doc" and ".xls"
Default is ".doc"
In a selected folder, if I select the other file type, it will not show anything on the selected folder unless I pressed enter button, whereas, in Windows XP all other applications changes the folder view automatically as per the selected file types
What I have missed, please help me to fix this in my tool
My code is as follows:
$xlsFileName = ""; my @types = (["3d Files",'.3d'], ["Excel Files",'.xls'], ["All fil +es", '*']); $xlsFileName = $mw->getOpenFile(-filetypes => \@types, -title=>'fi +le to read', -initialdir => $xlsFileName); $mw->Unbusy; return 'Cancel' unless($xlsFileName); $message = "Selected File: $xlsFileName"; $mw -> update;
Thanks in Advance
srikrishnan
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Doubt with getOpenFile
by stefbv (Priest) on Apr 29, 2010 at 09:07 UTC |