Hi everyone...
I'm trying to create a Windows Explorer-like file browser --
two panes side by side, one being a tree of directories, the
other side being a wxListCtrl showing a (filtered) list of
files in the selected directory. (If anyone already has
code to do this that they can send, that will solve lots of
problems and I'll be *very* grateful... )
Now, I'm sure that I can handle the ListCtrl just fine, but
I'm having some problems with the tree ctrl. (I don't
suppose there's any way to grab the tree widget from, say,
the wxDirDialog, without hacking the C++ source?)
I decided to try to use the MVCTree control, since it seems
to already provide most of the functionality I want... but
my attempts so far have been not terribly successful,
probably because I'm having a hard time wrapping my mind
around the module code. I've been able to subclass the
FSTreeModel to show only directories, and that works fine...
but it's rather slow to start for deeply nested trees, and
my intended use will need to display a full filesystem. So,
the LateFSTreeModel is what I need... but I can't seem to
get it to work right. (I'm trying to understand the library
class itself, before subclassing it.) It displays my root,
and the root's children, but it doesn't show any knobs with
which to expand any of those children! (The FSTreeModel,
given the same root, displays just fine.) I'm presuming
that, since it hasn't built any grandchild nodes at the time
it's displayed, the Painter doesn't recognize that it's not
a leaf node... but shouldn't that be what the IsLeaf()
method is for? It *looks* like IsLeaf() should be returning
false, but... ??? I tried tracing through the whole
process, last night, but without much luck...
If anyone could give me any pointers on this (perhaps a
quick overview of the interaction between the Model and the
Painter, in the context of late-bound tree building), I
would *greatly* appreciate it.
Jeff Shannon
Technician/Programmer
Credit International