Stanley,
To answer some of your points:
it must be fast and be able to support more than 32,000 nodes
The Microsoft Treeview control will struggle with that number. To be exact, it will be slow in populating the nodes. But once that's done, all the navigating and drilling should be fast.
It's possible to improve matters by populating the tree "on demand". By that I mean that you start by populating the top-level nodes. Then, when the user drills into a node for the first time, you populate that node's lower-level nodes. And so on. That will make the whole thing faster, but at the expense of more complex programming.
So, how would we indicate a folder node that only had partial files selected, as selecting the folder node would represent all sub nodes, and not the partial list.
Checkboxes in Windows have not two but three possible settings. As well as being checked and cleared, a checkbox can contain a "mixed" setting, which looks like checkmark with a grey background. This is what you need in order to show a mixture of selected and unselected nodes.
In VFP, you establish this third state by giving the checkbox an integer value other than 0 or 1. I'm not sure how to do it with the Treeview control, but I assume it's possible.
... you speak of saving the record number instead of its node id. My question is "record number to what"?
I know what you mean. The point is that whatever value you save, it should be something that doesn't change as the tree is refreshed. It would normally be a record ID rather than a record number. In the case of files and folders, I don't know what you would store, but that's an application problem, not something that's fundamental to the use of a treeview.
I'm off to look at some of the mentioned controls...
Good idea. But keep in mind that the treeview is only half of the control. You also need a way of showing individual files. I suggested using the Microsoft Listview control for that, as this exactly mimics the right-hand pane in Windows Explorer.
In fact, using the two Microsoft controls (Listview and Treeview) side by side will give you the most realistic representation of Windows Explorer, as you will be able to closely mimic its look and feel.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Visual FoxPro articles, tips, training, consultancy