Hey,

It could seem redundant, but I'm trying to do "Explorer" with Perl and Tk here. Why? Well, kinda a proof-of-concept deal. Besides, I can make it as I wanna have it! I know Tk is rather limited when it comes to some OS specific things (and maybe I should do it with Tcl::Tk even), but I already have parts done in Tk and I know Tk best atm. So, how to get the icon associated with a surtain filetype in Perl? And, second question... What module is prefered here? I was thinking going for a matrix module (for the browseing view). It leans towards Tk::Mlistbox, since it has support for sorting and resizeing the columns. However, if I wanna display icons? I'm not sure, but I couln't find anything about adding images (icons) in Mlistbox. Either way, it would be cool knowing if there was a way to get the icons used in windows per filetype. That is, I dont mind if this only gonna work in windows because usage of Win32::XXX modules. Sure, there is:
my $folderimage = $pane->Getimage("folder"); my $fileimage = $pane->Getimage("file"); my $srcimage = $pane->Getimage("srcfile"); my $textimage = $pane->Getimage("textfile");
but its rather limited as you can see.

Furthermore I was hoping to use this trick with say Hlist aswell, to display correct icons...

So, feedback are greatly welcomed here as I was thinking doing this as a module, which one can just insert in your own frame and access its nice methods to change the data...

Thanks,
Ace

In reply to "Correct" icons in selfbuild "Explorer" by Ace128

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.