Hi,
You can use the mouse down event to find out which node has been clicked by
the user.
private void treeView1_MouseDown(object sender,
System.Windows.Forms.MouseEventArgs e)
{
TreeNode selectedNode = null;
selectedNode = treeView1.GetNodeAt(e.X,e.Y);
}
The selectedNode will contain the Node that was clicked by the user.
--
Tarkeshwar
..Net Programmer
Fifth Generation Technologies
"UmmagummA" <fl***@mt.net.mk> wrote in message
news:uz**************@TK2MSFTNGP09.phx.gbl...
Is it possible to select a TreeNode in a TreeView from code?
There isn't a property Focused nor a func Focus(). I tried with (all the
Nodes are collapsed in this moment):
TreeViewObject.SelectedNode = aSpecifiedTreeNode;
but it doesn't work. After this assignment SelectedNode remeins <undefined
value>.