I like Tk, but I'm also aware of it's drawbacks. If I were you, I would do this in Gtk2, and use the TreeView. The way Gtk2 has it setup, it is extremely configurable, and more suited to expanding/collapsing trees, which can be nested to various depths. The model they use is much more complex, but it makes it more configurable. For instance, you can set it up, that as you click and open your tress, if there are multiple files to choose from, you can nest a drop down box(combbox) at any point in your tree. It would be a very good opportunity to learn Gtk2. You can include icons in your cells too.
Check out this, but I'm not sure if Mac has Gtk2 yet .
I'm not really a human, but I play one on earth.
flash japh
| [reply] [d/l] |
Hmm, can you elaborate on the problems with Tk here?
| [reply] |
Thats too big of of question. The basic drawback is that each Tk widget is an entity in it's own world, whereas every widget in a gtk2 is all based on the same object model. This makes it difficult in Tk to get low-level interaction between widgets in an app. But to just make a list of common complaints about Tk in complex apps...... sorting lists is difficult, memory is not cleaned up very well, getting colors into the various portions of widgets can be a mess(gtk2 with Pango markup lets you mix colors and fonts in a single label), no drag-and-drop support( yes, Gtk2 will let you drag files from one widget, and dump them onto another), better threads support, etc, etc, etc. Now I'm not trying to disparage Tk. It is very good for what it is, but Gtk2 has alot more thought being put into it. So which would you choose for a big, long-term project?
I'm not really a human, but I play one on earth.
flash japh
| [reply] |