M
Michael C
Hi all,
Quick question about the TreeView control. I'm using code like this to
determine the currently clicked TreeNode in the TreeView.
private void MyTreeView_MouseDown(object sender,
System.Windows.Forms.MouseEventArgs e)
{
currentNode = MyTreeView.GetNodeAt(e.X, e.Y);
}
The problem I have is, if you click on whitespace to the right of a
TreeNode, it returns the TreeNode to the left. I would like it to return a
null value if you click on whitespace to the right of the TreeNode; as you
receive a null value if you click on whitespace at the bottom of the
TreeView. Anyone know how I can accomplish this?
Thanks,
Michael C., MCDBA
Quick question about the TreeView control. I'm using code like this to
determine the currently clicked TreeNode in the TreeView.
private void MyTreeView_MouseDown(object sender,
System.Windows.Forms.MouseEventArgs e)
{
currentNode = MyTreeView.GetNodeAt(e.X, e.Y);
}
The problem I have is, if you click on whitespace to the right of a
TreeNode, it returns the TreeNode to the left. I would like it to return a
null value if you click on whitespace to the right of the TreeNode; as you
receive a null value if you click on whitespace at the bottom of the
TreeView. Anyone know how I can accomplish this?
Thanks,
Michael C., MCDBA