 |
|
Using MapInfo Callbacks Manager with Borland® Delphi
Do the following:
- Run Delphi;
- Select menu item Component|Import Active X Control...;
- Select MapInfo Callbacks Manager Acitve X (Version 2.0) from the list;
- Press Install button;
- Open existing project or create new one;
- Select MapInfoCallBacksManagerX component at Component Palette ActiveX page and place it on the form;
- Write Event handlers for the following events:
|
Event...
|
...occurs when...
|
|
OnLineTool
|
Line custom tool was used;
|
|
OnPolylineTool
|
Polyline custom tool was used;
|
|
OnRegionTool
|
Region custom tool was used;
|
|
OnRectTool
|
Rectangle custom tool was used;
|
|
OnEllipseTool
|
Ellipse custom tool was used;
|
|
OnPushButton
|
custom PushButton was used;
|
|
OnToggleButton
|
custom ToggleButton was used;
|
|
OnSymbolTool
|
Symbol custom tool was used;
|
|
OnSetStatusText
|
MapInfo status bar text was changed;
|
|
OnSetStatusItemsCount
|
transfer number of Panels to MapInfo Status Bar;
|
|
OnSetStatusItemText
|
transfer Text of Panel with ItemNo index to MapInfo Status Bar;
|
|
OnWindowContentsChanged
|
contents of MapInfo's child window were changed.
|
|
Note:
Don't forget to set MapInfo property correctly:
...
uses
ComObj;
var
MI: Variant;
...
...
procedure TForm1.FormCreate(Sender: TObject);
begin
MI := CreateOLEObject('MapInfo.Application');
MapInfoCallBacksManagerX1.MapInfo := MI; // !!!
end;
|
|