Article 311318, "HOW TO: Create a Key Property for a
TreeView Node in Visual Basic .NET". Explains how to
extend the treeview (and treenode) classes to include a
node Key. However, to obtain a node reference, you must
still either use the index, or use a for each ... next
loop in you code to get it by key. I would like to use
the node's key or index interchangeably. To do this, I
think I need to change the treeview's Nodes property from
type TreeNodeCollection to a user defined type
TreeNodeExCollection, inheriting everything from
TreeNodeCollection but the item property. How do I do
this?
When I try, I am forced to write my own New sub, and am
not allowed to access MyBase.New(owner as treenode),
because it is private.