I have a tree with multiple nodes. When left-clicking a node, the AfterSelect event returns the correct node in treeNode.SelectedNode. However, when right-clicking a node, treeNode.SelectedNode always returns the fist node, not the node I clicked.
For example, if I have a tree with 5 nodes, I would expect that right-clicking the 4th node would set treeNode.SelectedNode to that 4th node; however, I always get the 1st Node.
private void tvDrives_AfterSelect(object sender, TreeViewEventArgs e)
{
// Always returns 1st node in tree when right-clicking a node
TreeNode tNode = tvDrives.SelectedNode;
}
Any ideas?