I realize you specified Perl, but I suspect this is more of a job for javascript.
However, the following nodes (locating by Super Searching for "tree view"), may give you some hints or ideas:
HTH,
| [reply] |
At least one of my large clients insists that we do his Web applications without using ANY client side scripting at all (no JS, no cookies). So we need to do this for function menues on his applications. I dont have code I can extract to show you. However I can tell you that we use HTML::Template. In the template each branch of the tree is wrapped in an IF block. Of course you can next the IF's to get the tree depth. In your case, say dir1 gets clicked, you toggle the state of dir1 on the server side and when the page gets rebuilt the branch is either displayed or not.
In the past we have constructed complex data structures to make it all work, this usually means that each branch is fully populated all the time by the templating engine, only the IF parameters get changed. The HTML produced that way is pretty compact. Combine that with some spiffy CSS, such as that found at listamatic2 will give you the idea of how to generate the layout. It isn't trivial, but it ain't rocket science either.
If I could figure it out I am sure you can! jdotornto
Update I was just doing some more browsing and saw this one - a complete pop-up list with just HTML and CSS here. | [reply] |
If I understand you correctly, you want a GUI element that allows for a tree view of a directory structure? If so:
Tk::DirTree
This is a directory tree just like you describe. If you want something more generic, see
Tk::Tree
Hope this helps!
"Never take yourself too seriously, because everyone knows that fat birds dont fly" -FLC
| [reply] |
Interesting collection! Looks like some stuff worth investigating there. Thanks AM!jdtoronto
| [reply] |
If you are willing to switch back to Tk, you could try my Tk::CanvasDirTree. It is a single-click dir tree browser with floating background image. It has a few demos to show it's usage.
| [reply] |