I should confess that I hate file-selection widgets, especially the ones that assume the user can't possibly know what he wants or where anything is until you show it to him in excruciating detail, and therefore he has to be walked through every single layer up and down the directory structure in baby-steps -- bleah! It makes me sore.

So that would explain why I would actually recommend you go ahead and roll your own in this case. I know, from prior SoPW threads where we've both posted relevant help, that you can handle "File::Find" or choose a command-line "find" + "readdir" approach without any trouble. All you need beyond that is a good idea of how the tool should behave, one or two scrollable Listboxes, a Label or two, a nice wide Entry widget where you can type or paste, and maybe a dynamic "combo-box" style pull-down (a fancy way to keep a history of paths and/or files already visited). There's not that much to doing a decent job of it. And you'll know for sure that you can make it fit nicely with the rest of your GUI layout.

I realize I'm overstating the simplicity a little bit, but most of the subtlety is just a matter of keeping track of where you are, and knowing enough about what the user needs so that you keep it both simple and effective. I'd spend a little extra time looking for a way to have an Entry widget where I can type in a path and have filename completion bound to the tab key. (I don't know if any of the file-selector dialogs provide this. It's crippling not to have it.)

If you want to go in for all the cute decorations (icons determined by file-type, yadda yadda), then just ignore me, and good luck with the pre-packaged widget that gives you all that.


In reply to Re: The right Tk file selecter by graff
in thread The right Tk file selecter by etcshadow

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.