I'm getting some strange behaviour when getting a node back using GetNodeFromPoint().
It's bringing back the wrong node. Here is the result of two commands I typed into the immediate window to prove the point...
? pointInTree {X = 79 Y = 335} IsEmpty: false X: 79 Y: 335
? this.Tree.GetNodeFromPoint(pointInTree).Bounds{X = 1 Y = 301 Width = 479 Height = 20} Bottom: 321 Height: 20 IsEmpty: false Left: 1 Location: {X = 1 Y = 301} Right: 480 Size: {Width = 479 Height = 20} Top: 301 Width: 479 X: 1 Y: 301
As you can see the Point I passed in is not within the resulting node. The resulting node goes from a Y of 301 to 321. The point I passed in has a Y of 335 which would be the node underneath the one I got back.
Under what circumstances could this method bring back the wrong node?
Thanks,
Paul
After further investigation the node being returned is the correct node.
The problem is that the .Bounds.Y coordinates for the node does not take into account any column headers displayed in the TreeView. So the reported Y value is less that it should be, the difference being the height of all the column headers displayed above it.
I'm using a pretty old version though (7.3.20073.38). Maybe this has been changed in later versions.
I've used the UltraTreeNode.UIElement.Rect property instead and that is correct.
Hi Paul,
I'm pretty sure this is a known bug that was fixed a long time ago. Try getting the latest service release:
How to get the latest service release - Infragistics Community
I also use a TreeView with Grid as view style and ran into the same problem, that headers are not counted into the Y coordinate of the node's bounds. The Rectangle of the UIElement returns the correct value.I'm using Infragistics2.Win.UltraWinTree 11.2.20112.2004.