Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

show folder image in using TK

by veeruch (Sexton)
on Dec 18, 2006 at 11:25 UTC ( [id://590408]=perlquestion: print w/replies, xml ) Need Help??

veeruch has asked for the wisdom of the Perl Monks concerning the following question:

Hi perl monks
iam using TK,i have directory, how can i show directory like a folder in windows?.
Thanks in advance

Replies are listed 'Best First'.
Re: show folder image in using TK
by shmem (Chancellor) on Dec 18, 2006 at 13:32 UTC
    If you installed Tk, you also have the widget program.

    Run it, select "DirTree, diplay directory tree" in the "User contributed Demonstrations" section; in the WidgetDemo window, click on "See Code".

    Well, I guess this is what you want. Where do you want to "show directory like a folder in windows"? on the Desktop, in some window, in a hierarchical list, on a button, in a menu entry, next to a textbox, as a label?

    See How (Not) To Ask A Question.

    <update>

    The widget shown in the Tk demo is a composite widget, you'll find the source code for that in the file DirTree.pm in your perl library folder.

    </update>

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
Re: show folder image in using TK
by zentara (Archbishop) on Dec 18, 2006 at 13:29 UTC
    Make a set of icons, for the different types of directories, filetypes, links,etc, and put them on a canvas.

    I'm not really a human, but I play one on earth. Cogito ergo sum a bum
Re: show folder image in using TK
by zentara (Archbishop) on Dec 18, 2006 at 13:43 UTC
Re: show folder image in using TK
by prasadbabu (Prior) on Dec 18, 2006 at 13:58 UTC

    As other monks pointed out, your question is not very clear. If I understood your requirement correctly, the following node which is somewhat similar to your requirement written by GrandFather using Tk (Very nice node), Directory tree explorer with stats reporting may help you to proceed further. Some of the points in the coding may help you to start.

    Prasad

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://590408]
Approved by Joost
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-19 09:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found