Icon FindByPos Method

function FindByPos(X,Y: Integer): TElement

Available In: Visual Client Applications

Use this method to find an element, if one exists, at the specified coordinates. The search for the element includes the current element instance, and is performed using the visual stacking order defined by the DisplayIndex property of each element. Elements with a smaller display index (in front of other elements) will be found instead of elements with a larger display index, even if both elements have the same bounds.

Information This is a recursive method, and will search through grandchildren, great-grandchildren, etc. for an element with the specified coordinates.
Image