Directories & Trees

Directories & Trees

Zipguy 2013-02-07 - You can find out my email address by clicking on Zipguy.

On one drive, which is all mine (d:\), I've got 1228 Total Directories. They make lots of sense to me. To others, I don't know, but that's ok, because only I use them. I remember a TCL program I wrote which would allow me to "promote" a group of files to the parent directory. I have to switch directories a lot (thanks in part to starkit) when I'm working on them.


Zipguy 2013-12-28 - Here's my latest favorite nc clone, on Windows 7, named 'Just Manager'. This nice program does support more than two directories simultaneously, (unlike running multiple copies of Gyula's Navigator program). It looks like this:

I just got it from , which I'm trying, but liking so far. It does have FTP built-in to it, and has many other features. I'm still working through it's help, which is good. Also, it's 'Configuration->Settings...' is outstanding, it looks like this:

The rest of this page is still fairly current.

File Managers

I've been toying with the idea of writing a halfway decent program, like one I've been using to display a filename, ext, size (/folder) and date all in one row. The program I've been using was written to implement Norton's Commander (nc), which was written around 1993, in a newer version and lanuage. It displays directories "side by side" panels, where you can navigate directories, either up or down, in either pane that you are in. Then you can copy/delete/move/view/rename files, or create/delete directories. It also has some more advanced features like (Icons to provide these features)

  • Back - Means to go backwards (like you do in you browser)
  • Copy (which brings up a dialog)
  • Move (which brings up a dialog)
  • Delete (which brings up a dialog)
  • Search (which brings up a dialog)
  • Edit
  • View
  • Pack (and Unpack)
  • Map (and Unmap) Network drives
  • Invert Selection (if you have a few files selected)
  • Select all
  • Unselect all
  • Select Group (which brings up a dialog)
  • Compare the two panels (which brings up a dialog)
  • Refresh
  • Tree (which brings up a dialog just like the one in tk_getOpenFile)
  • Options (which brings up a notebooked dialog)
  • Help (which brings up a dialog)
  • Exit

to name a few. This is what it looks like:

It was written in 2002! I think all in C++, by Gyula Bibernath, which was purchased by Wanai. There must have been a LOT of C++ code in there. You can see it here at Yahoo! [L1 ] or you can download the 32 bit version from nonags where I found it at . If you go to the site where you'd expect to see it, it's not on there anymore :(. . 10 Years has been a long time.

On the other hand, Norton's File Commander, which is FAR older, has been the most attempted re-written program, because it used to be be written for monochrome screens, and used to be a DOS program, back when memory was Extremely expensive. I think it was written in pure Assembler language (for speed) and memory usage.


Zipguy 2013-12-28 - Well anyway, with a lot of persistence, and a little work, I came up with a program that would allow me to "Find and Run Programs", which is still evolving.

So I thought I'd look at things that would be good at handling Multicolumn listbox'es or switching directories, and I got a little lost here in wiki. I found then tablelist vs mclistbox afterwards which does support images as a column which sounded great. So I then went to , downloaded , got it installed on my computer, but unsucessfully :(. I'm still working on it. All the programs, which are demos, say:


Csaba Nemethi 2013-12-28 - I bet you didn't follow the Tablelist installation instructions, contained in both the file README.txt and in Tablelist Programmer's Guide. The error message shown above makes me suspect that you unzipped the distribution file at the wrong place.

Zipguy 2013-12-28 - Mea Culpa (My Blame)! Yes, I'm sorry, I'll try to get it working (, although I am using Windows 7), and I'm trying to get it to work while using tclkit-8.6.0-win32.exe. It may work if I follow the instructions you've described. It would be great if it did. Thank you Csaba Nemethi for your hard work.

So I punted and tried to get mclistbox from , downloaded it, and it does work. The program that came with it, example.tcl, turned out to be a font selector, which I do like:

But it was not a file browser. Oops, I was in the wrong folder. So I made sure I was in the right folder, and ran example.tcl (in the correct folder, which was not D:\dl\dcl\stock\zip\combobox\example.tcl which I got from ) and it was a directory browser:

Horray! Well it does work, but there are some features, it doesn't have, that I've grown real attached to. Some to mention are compared in tablelist vs mclistbox. I wish I had tablelist working which I did back in 2005 in my aforementioned program which was the "promote" a group of files. I think it also used my own code (which I borrowed from wherever I got it, somewhere on here when it was called ) to have a combobox in there to make it easier to decide how many levels up you wanted to "promote" them to. Or perhaps I had a version of that program which allowed me to quickly go up 3-5 directories, and then proceed back down the tree. It's gotten a little lost in my memories, but I did like to use it when a group of files needed to be "promoted".


But anyway, not to get off subject, what about trees? I like the one that was supported in Gyula's Navigator which looked like this:

which looked real good, but it was not re-sizeable. There was one in combobox which was at the "HugeCombo package" at , which was developed back in 2003, I downloaded it, unzipped it, and ran demo3.tcl in it, which looked like this:

and it did look pretty darn good. However it did not look as good with the "+" signs nor lack of them, and the lines that did look great in Gyula's version. So I went looking some more, and found another one which did look great (looking here ), althought it appears on a canvas, not a listbox. It was at What's wrong with the tree widgets? which I downloaded and made it into a file, and it looked like this:

which was wonderful. I'm still looking around for tree programs, which are smallish (not huge), and that I could give anyone credit for if I used it in my simple program that I'm trying hard to create. That is just one that let's you scroll around on your files, and move up and down folders (I mentioned at the bottom in Scrolled listbox widget -Display a list, pick any item then perform some follow up action.). I think that would be good for most TCL programmer's, if I could create one like that, that was not huge, would be great if I released it like I have ML - Heavily Modified & Improved, and it helped anyone to consider taking on the Norton Commander challenge. I'm just taking it one step at a time.

I'm still look around, because who would have thought that there are trees, many different versions, of different ages, out here somewhere. Also, what about Multicolumn listbox'es, are there many more of them hiding out here also?

Any help or comments on this would be welcome.

MG Have you looked at the ttk::treeview widget, which is part of Tk 8.5 and 8.6? It works as both a tree widget and a multicolumn listbox (either individually or both together).

Zipguy 2013-02-07 - Nope! I have the documentation for from Activstate with the help file. Now that they have come out with 8.6, I have already downloaded, which I have yet to install. I'll do that now and get back to you soon MG. Thanks for that. It does sound good (hopefully)!

Zipguy 2013-02-11 - I've got it installed and have looked at all the new programs for TCL, by running widget.tcl, which looks like this:

and I liked the program which was called "5. A directory browser tree", which did include filenames, sprinkled in with directory names (i.e. sorted). It looked like this:

I modified it a bit, removing the second item (size), and got it working well like this:

So what I'm going to try to do is let it pass the current directory, which I'm not sure where the tree widget stores it, and pass it to scrolledlistbox.tcl which can be found by searching on "Scrolled listbox widget". It does look like this

which would make a good sub-window for the main window, which would be the boss. One thing I don't like about it is that I always shows a + sign in front of the directory, even if it does not have sub-directories. I'm looking into this. I would prefer if it could pass the directory to:

as a subwindow also.


Also, just to make it complete, for now, here is the LemonTree program which I got from there:

Lemontree uses BWidget for the tree and is cleverly programmed, by a good author.

ttk Widgets

Zipguy 2013-04-16 - Perhaps, I should use ttk::treeview as a multicolumn listbox again as a subwindow. Looking into that. Now that I've had a chance to look at it again, I tried to combine the above mentioned progams (i.e. tree and mclistbox) into a program which only barely worked together. I did and I got this:

I like the way it looked, although I was using the button to drive the mclistbox part of it. So I thought, hmmm..., I need to look into ttk a little deeper. I did find the ttk::notebook in my docs, and an example at the bottom, which I modified. This I what I came up with:

It took me a little work to get all three combined but I did, ah.... success. This is what it looked like:

I thought, well great, and I played around with it a little and realized that I'd encountered a new problem, which looks like this:

So what my problem is that it does look real small, both in width and height, in both panes. Not sure why the ttk::notebook is making it so small. I'm looking into the ttk, which I'm sure I don't understand yet, but like it. The documentation is pretty sparse on that now.

I did a search on ttk and found lots of results. I found an interesting page here called Applications using Tile. There is an editor on that page, which is mentioned in the Tcl Editors page, which I did like the look of, a lot. It is called MSEdit and can be found here [L2 ]. I'm going to Unwrap it, take a look at it anyway, to see how they did all that, hopefully using ttk to do that. It does seem kind of large to me, which may mean it's Object Oriented (which is kind of a bummer for me) .


Any ideas on my non-expanding ttk::notebook Tk items?

Are there better examples of ttk usage? Not OO?

Is there a way to modify the icons in it, like the ones in this dialog:

for the tk_chooseDirectory, which I like a lot better? via themes or something?

Zipguy 2013-12-28 - Well it's not surprising that most people, would not have read this far, especially intelligent people. Perhaps, it's not the right place to ask questions.


Comments are welcome! Answers to the questions are terrific (in my opinion)!