N
nevin
Hi,
If I have a TreeView with loads of Nodes and they all have children etc, how
do I find the index of a given node when I only know the Text value?
If I use TreeView.Nodes.IndexOf(new TreeNode(textvalueofname)) it always
returns -1 and a TreeView.Nodes.Contains(etc.. always is false.
I expect that it is only looking in the local Nodes collection rather than
every single node in the TreeView.
So how do I easily find any given node in a TreeView if i only know the Text
field's value?
would i have to enumerate the entire collection?
TIA
Nev.
If I have a TreeView with loads of Nodes and they all have children etc, how
do I find the index of a given node when I only know the Text value?
If I use TreeView.Nodes.IndexOf(new TreeNode(textvalueofname)) it always
returns -1 and a TreeView.Nodes.Contains(etc.. always is false.
I expect that it is only looking in the local Nodes collection rather than
every single node in the TreeView.
So how do I easily find any given node in a TreeView if i only know the Text
field's value?
would i have to enumerate the entire collection?
TIA
Nev.