This document is archived and information here might be outdated.  Recommended version.


IGraphicsContainerSelect.SelectionTracker Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Carto)  

IGraphicsContainerSelect.SelectionTracker Method

Returns the tracker for the nth selected element. Use Selection count to get the number of selected elements.

[Visual Basic .NET]
Public Function SelectionTracker ( _
    ByVal Index As Integer _
) As ISelectionTracker
[C#]
public ISelectionTracker SelectionTracker (
    int Index
);
[C++]
HRESULT SelectionTracker(
  long Index,
  ISelectionTracker** tracker
);
[C++]

Parameters Index [in] Index is a parameter of type long tracker [out, retval]
tracker is a parameter of type ISelectionTracker

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

Elements have associated selection tracker objects which provide reshaping functionality.  For example, in ArcMap after adding an element, the element is drawn with a selection tracker around it and users can then drag one of the selection handles on the selection tracker to modify the element's shape.

There are several types of selection tracker objects including EnvelopeTracker, MarkerTracker, PointTracker, and PolygonTracker.  When an element is first selected, an EnvelopeTracker is created for it.  However, if the element has its IElementEditVertices::MovingVertices property set to TRUE, then the geometry of the element dictates the type of selection tracker created.  For example, a line element will create a LineTracker.

IElement::SelectionTracker checks if the elements IElementEditVertices::MovingVertices property is set to TRUE;  if so, IElementEditVertices::GetMoveVerticesSelectionTracker is called to create the appropriate tracker object for the element.  If MovingVertices returns FALSE, then an EnvelopeTracker is created for the element.

In ArcMap, selecting an element creates an EnvelopeTracker but the 'Edit Vertices' command swaps the it out with a PolygonTracker or LineTracker.  Some elements such as a MarkerElement, CircleElement, EllipseElement, and RectangleElement, only create EnvelopeTrackers and the vertices of the these elements cannot be edited.

See Also

IGraphicsContainerSelect Interface