J
Jeff
Hey
..NET 2.0
I'm trying to search a TreeView control for a specific TreeNode
The code below doesn't work because it only searches the the top level of
the nodes. I would like to program it so that it can find a TreeNode
anywhere in the TreeView... any suggestions on how to implement it ??
private bool PreRemoveTabPage(TabPage tab)
{
foreach (TreeNode n in TreeView1.Nodes)
{
if ((TabPage)n.Tag == tab)
{
n.Tag = null;
}
}
return true;
}
..NET 2.0
I'm trying to search a TreeView control for a specific TreeNode
The code below doesn't work because it only searches the the top level of
the nodes. I would like to program it so that it can find a TreeNode
anywhere in the TreeView... any suggestions on how to implement it ??
private bool PreRemoveTabPage(TabPage tab)
{
foreach (TreeNode n in TreeView1.Nodes)
{
if ((TabPage)n.Tag == tab)
{
n.Tag = null;
}
}
return true;
}