private void selectNode(TreeNode node)
{
foreach (TreeNode nd in node.Nodes)
{
if (nd.Text == txtBox_a_no.Text.Trim())
{
//注意这里
trV_All.Select();
trV_All.SelectedNode = nd;
break;
}
else
{
selectNode(nd);
}
}
}
采用遍历树的办法,找指定的结点
private void selectNode(TreeNode node)
{
foreach (TreeNode nd in node.Nodes)
{
if (nd.Text == txtBox_a_no.Text.Trim())
{
//注意这里
trV_All.Select();
trV_All.SelectedNode = nd;
break;
}
else
{
selectNode(nd);
}
}
}
采用遍历树的办法,找指定的结点