Maptitude GISDK Help |
GISDK lets you attach five types of macros to windows, so that you can perform certain types of processing automatically when the user takes certain kinds of actions.
Activate macros run automatically when a user clicks in a window on the screen to activate it, or when a window becomes active because the previously active window is closed. When the last map, editor, or layout is closed, the frame is activated and the activate macro for the frame runs.
Activate macros are typically used to enable and disable menu items and tools, so that only the appropriate commands are available. When you click from window to window in Maptitude, the following things occur:
Maptitude automatically displays the correct menu system and toolbar
The activate macro for the window checks the current state of the window, and enables and disables menu options and tools as appropriate
Close macros run when the user chooses Close from the system menu, or clicks the close box in the upper-left hand corner of the window. Close macros normally ask the user to confirm that the window should be closed and perform any necessary bookkeeping. If the close macro returns null, the window closes automatically. If the close macro returns any other value, the window does not close.
Done macros run after a window has been closed, so that you can perform actions after the closing of a window.
Scale-change macros are attached only to map windows, and run automatically when the scale of the map changes. For example, if the user zooms in using the zoom tool, or changes the map window size (which affects the scale as well), the scale-change macro runs automatically.
Highlight macros are attached only to editors, and run automatically when the highlighted cells in the editor change. This happens each time the user clicks in a cell, clicks on a column heading, or drags a highlight across a set of rows and columns.
You can use SetDefaults() to assign default window macros to each type of window.
For more information, see:
©2025 Caliper Corporation | www.caliper.com |