Maptitude GISDK Help |
A toolbox is a dialog box that remains on the screen while the user interacts with maps, dataviews, menus, etc. A toolbox is non-modal: it does not take over the application. A toolbox definition can include tool items. When a toolbox is invoked with RunDbox(), its Init macro, if any, is executed, and the RunDbox() call returns immediately, leaving the toolbox displayed on the screen. To create a toolbox, specify the Toolbox option in a dialog box resource definition:
{static} Dbox "Name" {(arg1,arg2...)} {{{{hpos},vpos},width},height} {options}
Toolbox
<dialog box items go here>
endDbox
If you declare a toolbox static it can only be called from resources within the same resource file in which the toolbox is defined.
In addition to the Title, Help, and Location options allowed in the definition of a dialog box, a toolbox definition can also include the NoKeyboard, Docking, and Docked options.
Option |
Description |
NoKeyboard |
Indicates that the toolbox should not retain keyboard focus when the user interacts with it |
Docking: locations |
Allow the toolbox to be docked at specified locations: top, bottom, left, right |
Docked: location |
The initial docked position: top, bottom, left, right, or a variable (1, 2, 4, 8) |
The NoKeyboard option makes it easier for the user to interact with the toolbox and a window, because clicking on a tool does not change the keyboard focus. For example, without this option the user has to click on the tool, then click on a map to make it the active window, then click again to use the tool. With this option the user can click on the tool and then immediately start clicking with the tool on the map.
A toolbox is not resizable and does not reorient, but can be docked where specified with the Docking option. For example, to allow the toolbox to be docked to the top or bottom of the frame window, but not the sides, use:
Docking: top, bottom
You can indicate the initial docked position with the Docked option. For example, to initially dock the toolbox on the bottom, use:
Docked: bottom
You can also use a variable to indicate the position, where 1=top, 2=bottom, 4=left, and 8=right. With a variable, you can both determine and change the position. You can initialize the variable in the Init macro, and you can make the variable a local variable to retain its value.
A toolbox definition can also include an update item, and a close item. The following GISDK functions are available for toolboxes in addition to those for dialog boxes:
GISDK Function |
Summary |
Runs the update macro of a toolbox or toolbar |
|
Closes a toolbox or toolbar |
For more information, see...
©2025 Caliper Corporation | www.caliper.com |