dave_p_r_b
asked on
"Nodes" property in the TreeView control
hello,
I wanted to derive a class from "TreeNodeCollection". (e.g. TreeView.Nodes Property).
Can anybody give a quick explaination as to why they would want to prevent the programmer deriving from this class?
Thanks,
D.
I wanted to derive a class from "TreeNodeCollection". (e.g. TreeView.Nodes Property).
Can anybody give a quick explaination as to why they would want to prevent the programmer deriving from this class?
Thanks,
D.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
TreeView myTV;
myTV.Nodes.Add(myTreeNode)
I wished to add extra functionality to the TreeNodeCollection.Add() function to do some extra checks. If, according to my additional checks, it was not ok to add the node then .Add() would return without adding to the collection.
I need to compare the node that is being added to the existing nodes.
I guess I'm going about this the wrong way.