oceanic99
03-14-2003, 04:26 PM
I'm creating an Explorer style interface for an application. I have a form with a TreeView control and a ListView control. I need a little help getting started with the TreeView control and have not found any good examples. My question is fairly simple, I'm just unfortunately not very familiar with this particular control. I do not want to display the directories for all drives, only for a specific folder.
Here is my question:
If I wanted to have the root node be "C:\My Documents" how would I add that to the TreeView control? I do not want to display any other directories in my TreeView control.
Here is what I have tried:
Dim rootFolder As Folder
Dim fso As New Scripting.FileSystemObject
rootFolder = fso.GetFolder("C:\My Documents")
tvMyTreeView.Nodes.Add , , rootFolder, rootFolder.Name
Any help would be greatly appreciated. Currently nothing displays in the TreeView control when I run the application.
Here is my question:
If I wanted to have the root node be "C:\My Documents" how would I add that to the TreeView control? I do not want to display any other directories in my TreeView control.
Here is what I have tried:
Dim rootFolder As Folder
Dim fso As New Scripting.FileSystemObject
rootFolder = fso.GetFolder("C:\My Documents")
tvMyTreeView.Nodes.Add , , rootFolder, rootFolder.Name
Any help would be greatly appreciated. Currently nothing displays in the TreeView control when I run the application.