Mapsets, Maps, Controls and Properties

Before you begin working with the Map Editor, it is worth reading this section to gain an understanding of the terms mapset, map, control and property and the relationships between them.

Maps are used to define how information is displayed and printed by your applications. They are set up using the Map Editor, which you use to define the map, draw its text and edit boxes, and add its other controls (buttons for example). Maps are numbered and stored within a named mapset.

Each map can exist in multiple languages. Maps from different languages should have equivalent controls, but with necessary changes for each language: controls may need to be a different size when one language is more verbose than another, the controls' captions will usually differ, and a different font may be required. The Map Editor allows you to edit maps from any language code, but does not enforce any consistency between languages. To do this it is best to print out the maps from one language using MapMake Translator format, translate the text file produced using a text editor, then post the maps back. Then you need to check the control sizes using Mapedit.

The usual reason that maps are held in a particular mapset is that they are displayed by the same applications. Mapsets are, however, stored on the database independently of their applications. This means that you can change many of the characteristics of the map without recompiling your applications.

Maps can contain any of the following types of control:

Control Description

Attach points or hooks, are for overlaying the map with other maps (any other control can also be used as an attach point, but attach points are useful when you do not want a visible control)

Bitmap controls allow you to display pictures in your map. Bitmaps can be built into an application or the DP4 resource DLL or can be displayed directly from BMP or other image files. Some other controls, notably buttons, can also display a bitmap on themselves.

Buttons have an associated keystroke that is simulated when they are clicked and usually cause some action to take place.

Check boxes enable or disable a particular option or answer a question. The option is enabled when X appears inside the check box; it is disabled when the check box is empty.

Edit boxes are fields for displaying and editing data.

Enumeration controls look like edit controls, but work more like radio buttons. They allow you to select one of a fixed list of options from a pop-up window on screen. They are useful when you don't want to select the options using a static data table on a database. They may be particularly useful when you want to prepare versions of an application in several different languages, or where radio buttons would take up too much room on screen.

%1

Embedded fields are not true controls, but pieces of replaceable text that live inside various types of control. They are useful for doing things like adding filenames to title bars or error message text. You can find out more about embedded fields here.

Group boxes are the standard way of grouping related controls in a map. A group box surrounds its controls with a line and normally has a title.

Headers are used to make a column of controls underneath resizeable. The boundary between two headers can be moved resizing both columns. You can also make headers clickable and add extra functionality like reordering a list according to the column clicked on. You can find background information on header controls here.

Icons allow you to display seven predefined icons or your own custom icons. In the latter case icons can be built into an application or the DP4 resource DLL or can be displayed directly from ICO files.

______

The Line control adds horizontal or vertical lines to the map.

Radio buttons present two or more mutually exclusive options. You pick one of the options by clicking the associated button to highlight it.

Tabs are used to create multi-page dialogs. A row of tabs is placed above a control to which another map is attached. Clicking on one of the Tabs attaches the appropriate map to display the corresponding page of the dialog. The Add Tabs option is useful for creating a prototype of the maps needed for this type of dialog.

Text controls are used for unchanging text which allows you to provide descriptions for the edit controls on the map. They can also be used to create the options in a menu. Internally each map also has a special text control that is the background for the whole map. This control determines the size of the map, its border and title and it is this control you edit when you edit the Map Properties.

VCR buttons are used to provide various pre-defined buttons that are often useful for navigation. They are similar to buttons, but start working as soon as they are pressed whereas ordinary buttons only work when they are pressed and released.

Controls are defined by their properties. For example, the main properties of a button control are its caption, its associated key press and its width and height. If you double-click any control on the map, a dialog will appear that defines the properties of the control:

Because a control can have many properties, they are grouped together on separate tabs in the properties dialog:

It is possible for a control to be "shared" between different maps, so that editing it in one place changes its properties in all the other maps that use it. This can be an important time saver for standard controls that are used in many maps (for example OK and Cancel buttons). For more information see Sharing Control Properties.