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


ITraverseWindowEvents Interface (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Editor > ESRI.ArcGIS.Editor > Interfaces > IT > ITraverseWindowEvents Interface
ArcGIS Developer Help

ITraverseWindowEvents Interface

Provides access to Traverse Window events. Implement it to listen to specific events that occur when the Traverse Window is used.

Product Availability

Available with ArcGIS Desktop.

Members

Name Description
Method OnActivate Called when the Traverse Window dialog is activated.
Method OnAddCourse Called after the course is added.
Method OnChangeCourseType Called when the course type changes.
Method OnChangeCurveDirectionType Called when the curve direction type changes.
Method OnChangeCurveParameter Called when a curve parameter is changed for either the tangent curve or curve course.
Method OnChangeTurnDirection Called when the turn direction is changed.
Method OnDeactivate Called when the Traverse Window dialog is deactivated.
Method OnLoadTraverse Called when a traverse is added from a text file.
Method OnPositionChanged Called when the position of the Traverse Window dialog changes.
Method OnSetFinishPoint Called when the finish point of the traverse is set.
Method OnSetFocusToMeasure Called when the focus is set to one of the measure text controls.
Method OnSetStartPoint Called when the start point of the traverse is set.

Classes that implement ITraverseWindowEvents

Classes Description
TraverseWindow Dialog for creating traverses.
[C#]

The following code shows an example of wiring traverse window events in C#.

public void WireTraverseWindowEvents()
{
  //You can get app from ICommand :: OnCreate() hook parameter
  UID editorUid = new UIDClass();
  editorUid.Value = "esriEditor.Editor";
  IEditor editor = app.FindExtensionByCLSID(editorUid) as IEditor;

  //Get a reference to the traverse window
  UID extUid = new UIDClass();
  extUid.Value = "esriEditor.TraverseWindow";
  ITraverseWindow traverseWindow = editor.FindExtension(extUid) as ITraverseWindow;

  //Wire traverse window events
  ((ITraverseWindowEvents_Event)traverseWindow).OnAddCourse += new ITraverseWindowEvents_OnAddCourseEventHandler(OnAddCourse);
}

void OnAddCourse()
{
  System.Windows.Forms.MessageBox.Show("Course added");
}
[Visual Basic .NET]

The following code shows an example of wiring traverse window events in VBNet.

  Public Sub WireTraverseWindowEvents()
    'You can get app from ICommand :: OnCreate() hook parameter
    Dim editorUid As UID = New UIDClass()
    editorUid.Value = "esriEditor.Editor"
    Dim editor As IEditor = TryCast(app.FindExtensionByCLSID(editorUid), IEditor)

    'Get a reference to the traverse window
    Dim extUid As UID = New UIDClass()
    extUid.Value = "esriEditor.TraverseWindow"
    Dim traverseWindow As ITraverseWindow = TryCast(editor.FindExtension(extUid), ITraverseWindow)

    'Wire traverse window events
    AddHandler (CType(traverseWindow, ITraverseWindowEvents_Event).OnAddCourse), _
      AddressOf OnAddCourse
  End Sub

  Private Sub OnAddCourse()
    System.Windows.Forms.MessageBox.Show("Course added.")
  End Sub