Hey,
I have this bigger app I made in Tk, and I was planing of "borrowing" Finder's column view from MacOSX, and add that to my app. Hehe :). I'm sure I can do this all without any help, but I was thinking that I ask here so I get some bright feedback/suggestions before I start. So I get it perfect! Many brains are (usually) better than one ;). Also, dont wanna do something that is already made (if now this was, although I doubt it. Couldn't find it searching). I assume that doing this would be best as some module, and using other modules. But, Im not really sure what modules would be best suitable... (MListbox?, HList?, Listbox?) I dont really need header title. And how to put the nice > on the far right in the list?
And, in case someone don't know what I'm talking about:
We have columns of files and directories showing. One column for a particular directory. And when a directry is selected, contents in that directory is shown in another column, next to the previous one (added to the right). (Otherwise a preview may be shown for the file selected). You can enter the selected directory by right-arrow (or, well, let that be configurable!) You can also go back. In short, you can navigate through the hierarchy here...
file1 dir1 > [file1] some preview maybe
file2 file1 file2
file3 [dir2] >
[dir1] >
dir2 >
file4
dir3 >
where the [
...] means selected. In this example, we have selected dir1, then dir2 in the second column, and then file1 in the third column.
So, I wanna create this using some Tk List. Question is, which module(s) do you guys here think I should use? And other feedback is welcome. Even some requests. :) . I was also thinking that it should be rather easy adding a new column (natrually). $columnview->addColumn(@file_and_dir_list); something... where the array contains hashes. (array to keep order, hash so its both easy expandable, and convenient using). That is, for now the hash should contain either 'file' => "file1" or 'dir' => "dir1".
Also, I suppose that adding should happend in "realtime". That is, some sub is called when something is selected. In that sub the user adds whatever wanted. (hey, one can use this module for more than just files and directories!! Like browsing through music. Album -> All titles)
Hmm, typing and thinking more about it, maybe there should be a possability to shoose adding either a list of stuff, or a new Tk thing (Canvas, Frame, whatever). That way user can do alot of cool stuff! And is not limited at all.
Oh, and, what name could be suitable? Tk::ColumnView?
Thanks,
Ace
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.