ArcPad Scripting Object Model
TrackRectangle Method
See Also  Example  Send comments on this topic.
Map Object : TrackRectangle Method

Glossary Item Box

Description

Displays a rubber-band rectangle on the Map and returns a Rectangle object.

Syntax

Set variable = object.TrackRectangle

Return Type

Remarks

Scripts that use the TrackRectangle method should be called when an OnPointerDown event occurs for a ToolItem object. The user would click the ToolItem object (tool button), press and hold the mouse button to start the Rectangle, then drag the mouse pointer to the opposite corner of the shape as required, and then release the mouse button to end the Rectangle.

Example

Zooms in to the extent defined by the Rectangle returned by the TrackRectangle method.
TrackRectangle Example (VBScript)Copy Code
Sub ZoomByTrackRect
  Dim objRect
  Set objRect = Application.Map.TrackRectangle
  If Not objRect Is Nothing Then
    Application.Map.Extent = objRect
    Set objRect = Nothing
  End If
End Sub

See Also

© 2013 All Rights Reserved.