Hi mtr4cv,

I do not have an easy answer for you. FileDialog ISA Toplevel and should take -takefocus => 1 as an argument. It appears not to. I tried some sample code on a win2k box and saw the problem you described. Looking at the module code it does not appear to handle focus like a typical module (using Toplevel) would.

I think FileSelect works in a much more intuitive manner than FileDialog does. It looks decent enough and behaves like a typical popup (*not* verified on win2k). The added advantage is that FileSelect is a standard part of Tk so you won't annoy potential downloaders with 'yet another module to install syndrome'.

Update: Confirmed - FileSelect works as expected in win2k (at least). I recommend you use it - have a peek at FileSelect.pm to see the available configuration options.

Sorry I couldn't be of more help - I tried to bludgeon FileDialog into submission, but it wouldn't listen. Bad module! {g}
{NULE}
--
http://www.nule.org


In reply to Re: Annoyance with Tk::FileDialog in MSWindows by {NULE}
in thread Annoyance with Tk::FileDialog in MSWindows by mtr4cv

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.