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


In reply to Doubt with getOpenFile by srikrishnan

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.