ArcObjects Library Reference (Controls)  

IPageLayoutControl.LocateFrontElement Method

Locates an element at the given page co-ordinates. If more than one element is at the location the element nearest the front is returned.

[Visual Basic .NET]
Public Function LocateFrontElement ( _
    ByVal pageX As Double, _
    ByVal pageY As Double, _
    [ByVal Tolerance As Double] _
) As IElement
[C#]
public IElement LocateFrontElement (
    double pageX,
    double pageY,
    double Tolerance
);
[C#]

Optional Values

Tolerance   Supply 0 as a default value.
[C++]
HRESULT LocateFrontElement(
  double pageX,
  double pageY,
  double Tolerance,
  IElement** element
);
[C++]

Parameters

pageX [in]   pageX is a parameter of type double pageY [in]   pageY is a parameter of type double Tolerance [in, optional, defaultvalue(0)]   Tolerance is a parameter of type double element [out, retval]

  element is a parameter of type IElement

Product Availability

Available with ArcGIS Engine.

Description

LocateFrontElement is typically used within the IPageLayoutControlEvents::OnMouseDown event to retrieve an element at the given page coordinates. If more than one element exists at the given page coordinates, the element located at the front is returned.

See Also

IPageLayoutControl Interface | IPageLayoutControl.AddElement Method | IPageLayoutControl.FindElementByName Method