Tool events – Pitney Bowes MapXtreme User Manual

Page 147

Advertising
background image

Chapter 7: Desktop Applications, Controls, Dialogs, and Tools

Tool Events

MapXtreme v7.1

147

Developer Guide

Tool Events

The MapInfo.Tools namespace supports tool events with information and the ability to cancel the
tool’s operation. A Select Tool’s event lists the items being selected or deselected. Events can be
fired at every stage of use of a particular tool. In your code you can trap certain moments in the
lifecycle of the usage of a tool. Adding code to particular events gives you the maximum flexibility on
customizing the use of each tool in your mapping application.

The events in the namespace are as follows:

FeatureAddingEventArgs

This event is fired when an add tool is about to draw
an object.

FeatureAddedEventArgs

This event is fired when an add tool has added an
object to a table and map.

FeatureSelectingEventArgs

This event is fired when a selection tool is about to
change the selection.

FeatureSelectedEventArgs

This event is fired when a selection tool changes the
selection.

FeatureChangingEventArgs

This event is fired when a selection tool is about to
change a feature. Use this event to check to see if
the change that is going to happen is valid.

FeatureChangedEventArgs

This event is fired after a selection tool changed a
feature.

NodeChangedEventArgs

This event is fired when a selection tool alters the
nodes in a selection.

NodeChangingEventArgs

Fired when a selection tool is about to change a
node of a selected feature. Use this event to check
to see if the change that is going to happen is valid.

ToolActivatedEventArgs

This event is fired when a mouse tool is activated.

ToolActivatingEventArgs

This event is fired when mouse tool is about to be
activated.

ToolEndingEventArgs

This event is fired when a mouse tool is about to
end. This is a good place to have a new action
begin.

ToolUsedEventArgs

This event is fired when a mouse tool is in use. Use
this event to set flags for the beginning, middle, and
end of a the sequence of mouse clicks.

Advertising