Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
995
How to find all nodes within rectangle bounds?
posted

I am implementing a solution for a cursor drag selection of nodes within a visible rectangle, just like we do in Windows Explorer with files and folders. I have the rectangle part working and have some slick method of getting the nodes on the edge of the rectangle. However, if my rectangle is dragged past the nodes I cannot see them.

I am pretty sure there is a way to determine if a control falls within the bounds of a rectangle. Is there a way to do this with the tree nodes? I can use GetNodeFromPoint but only when I have a specific point. Is there a GetNodeLocation and then compare that to the bounds of the rectangle?

 Any points on this would be great. Even just how to determine if a specific location falls within the rectangle location. Thanks.