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


ITraverseWindowEvents Interface (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Editor)  

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

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

CoClasses that implement ITraverseWindowEvents

CoClasses and 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