find a TreeNode in a TreeView., how?
- From: "Jeff" <it_consultant1@xxxxxxxxxxxxxxxxxx>
- Date: Tue, 16 Oct 2007 21:37:17 +0200
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;
}
.
- Follow-Ups:
- Re: find a TreeNode in a TreeView., how?
- From: Peter Duniho
- Re: find a TreeNode in a TreeView., how?
- From: Chris Shepherd
- Re: find a TreeNode in a TreeView., how?
- From: xmail123
- Re: find a TreeNode in a TreeView., how?
- Prev by Date: Re: ASP, ASP.net, and C#
- Next by Date: Re: Performance Issues with Delegates
- Previous by thread: ASP, ASP.net, and C#
- Next by thread: Re: find a TreeNode in a TreeView., how?
- Index(es):
Relevant Pages
|