title: select a node in treeview programmatically in windows application
body: <p>i have load a tree view. i want to Traverse treeview node and expand &amp; select a node. Expand is working fine. but select a node is not working.</p>
  
  <pre><code>private void Traverse(TreeNodeCollection nodes, string findtext) 
          {
            foreach (TreeNode node in nodes) 
              {
                  if (node.Text.ToString().Trim() == findtext)
                  {
                      node.Expand();
                      node.TreeView.SelectedNode = node.NextNode;                    
  
                      //tvwStructureTree.SelectedNode = this.tvwStructureTree.Nodes[node.Index];
  //Select a node in Treeview tvwStructureTree But not working
                      tvwStructureTree.SelectedNode = node; 
                      node.TreeView.Focus(); 
                  }
                  Traverse(node.Nodes, findtext); 
              } 
  
          }
  </code></pre>
  
  <p>Its in windows application. </p>