Hiding a treenode

Manwë

New member
Joined
Feb 15, 2005
Messages
1
Programming Experience
5-10
Hello at my first post here!
I'm working at a front-end to a database in VB.Net and the most fitting approach is a treeview. As I want to implement filtering in my program, I want to be able to hide some of the treenodes. Since the treenode doesn't have a Visible property or a Hide member function, I first tried to make an array of nodes that don't satisfy the filter. This approach had it's drawback: when I removed the filter, and passed back the eliminated nodes to the Nodes collection, they weren't ordered any more. Using an overloaded sorting sub is cumbersome, because I have about 100 types of node, all derived from a basic type, and I would have to write 100 sorting subs and, possibly, at further development, I would eventually have to modify those subs.
So, I thought it must be possible to override the display function of the treeview, so that it skips the 'filtered' nodes.
The problem is I don't know which is the function/method that I should override.
Could anybody help me on this one?
 
Top Bottom