How to PreFill TreeView with all Directories


Want to fill a TTreeView with the complete directory structure upon connecting.  That is populate the tree with the entire directory structure with no files. 

In the demo, CloudStorageDemo, one must manually step through the tree to populate the directory structure, and files are included.

Thanks in Advance

To fill the TreeView one needs to call:

   Storage.GetDriveInfo;
    Storage.FillTreeView(TreeView1);

But how do I get rid of the > and the v icons in the TreeView and put back the + and - icons to indicate a node can be expanded or not ??


Regards,

Hi,


You can indeed use GetDriveInfo to get the entire folder structure.
Note that there is currently no built-in functionality available to leave out the files when filling the TreeView. You'll have to manually iterate the Drive collection and populate the TreeView.