|
Re: Filling out a treeview on a form
Above was fixed already, post was lost. It was a corrupt file
Ok, I've populated my treeview with drvnodes for drives, dirnodes for folders, and filenodes for files. I have a sub for nodeclick that does pretty well, as long as I don't accidentally click on a filenode. It then screws with my program and causes all kinds of exceptions to occur, because it's filling out the tree with directories and files according to node clicked. I need to filter out my filenodes when they're clicked, but I can't figure out how to determine if a node is a drvnode, dirnode, or filenode. I thought the key would do it, but that is an integer index. At present, I've switched to adding files into a listbox until I can come up with a solution. The problem with this, it makes it harder to get a path to the file via my treeview.
Does anybody have any suggestions?
I may leave the files in the listbox since there is no apparent way to select multiple nodes from a treeview; but I would still like to know how to tell the node type.
|