Hi,
VS2008
Trying to implement a simplified version of Mike Gold's tutorial on
Drag Drop.
My problem is that the dragover event handler never appears to pass
over a node.
I move the 'envelope' all over the tree view but FindTreeNode always
returns null.
The event handler e member appears to contain legiitimate X,Y
co-ordinates but myTreeView.GetNodeAt(X,Y) always returns null;
Any clues as to what I am doing wrong?
thanks
Bob
Code follows:
private void tvInstallation_DragOver(object sender, DragEventArgs e)
{
//Point p = new Point(e.X,e.Y);
TreeNode aNode = FindTreeNode(e.X, e.Y);
if(aNode!=null)
{
aNode.BackColor = Color.DarkBlue;//NEVER GET HERE
}
}
private TreeNode FindTreeNode(int X,int Y)
{
return tvInstallation.GetNodeAt(X,Y); //Getting Called but
always returning null
}