Designing the Map for the EMPLOYEE Program

When the dialog appears, the focus will be on the caption—type in: Employee Table Update

You will also add a shadowed thin border effect to the map. Just below the caption there are a group of radio buttons that control the border style; click on the appropriate one as shown below:

Button

Choose?

Description

None

No

No border

Thin

Yes

Applies a plain border around the text field

3D

No

Applies a 3D-style look to the text field

There is a Shadow tick box. Click on it to give the text field a shadow. Finally, to centre the text, click on the Centre option in the Justification panel. Now click on the OK icon located at the bottom of the dialog to return to editing mode.

Add the following text fields to the screen; select right justification for each.

Employee Number

Employee Name

Gender

Grade

Date Of Birth

When you have finished them, select them all and use the right-alignment button on the action bar to arrange them neatly.

Adding Icons

The Map Editor allows you to add icons to the screen. Either click on the I icon in the toolbox and then at the appropriate place on the screen or choose Icon from the Controls option on the menu bar.

Do one of the above and place an icon on the screen just to the side of the title. Its position can be changed by clicking and dragging it. To change the icon type, double-click on it. There will be a range of DP4 icons in the dialog that appears—find the DP4 icon and click on it. Now choose OK from the bottom of the dialog box to return to editing mode.

Adding Database Fields

To complete the update entry screen, you must add database fields to the screen. These must be positioned so that they relate to the corresponding labels that you placed earlier. For example, the Employee number field needs to be placed adjacent to the Employee number text label.

The devices for displaying database fields in the map editor are known as edit text controls. To add an edit control to the screen either click on the edit text icon in the toolbox or choose Edit from the Controls section on the menu bar. Place it next to the Employee number label.

Next you must specify the source of the data to fill the control. Double-click on the edit control.

Double-clicking on the control causes the Edit Properties dialog to appear. This dialog can be used to specify the appearance, access rights and contents of edit controls. For the control to display information from a database, you must specify in the Data section of the dialog what it is to display. Click on the Data section. Under the Source heading, tick the Database box which will cause a Field pull-down icon to appear. Clicking on the pull-down icon brings up a menu of all the fields in the database. Find and select the Employee_Number field.

In the same way add ‘Edit’ controls for the remaining labels: Name, Gender, Grade, and Date Of Birth.

It is important that the controls are inserted in this sequence—the order that the controls are added is also normally the sequence in which the user moves between controls when using the program.

Your screen should appear as follows:

The field layout needs to be specified. This is set on the main map properties dialog. Access this either by double clicking on a blank area of the map or by choosing Map Details from the Edit option of the menu bar.

In the Field Layout section of the dialog are the Rows and Columns headings that specify the format of the fields on the map. In this example, the map you have created consists of one column of fields that is five rows down. Accordingly, place 5 in the rows field and 1 in the columns field.

Miscellaneous Features

QA Build provides many features for customising the display features of an Edit text control. Here are some more from the General page that you haven’t used yet:

Option

Description

Field Nr

The Map Editor automatically supplies the next unused field number. Numbering the fields correctly is essential, because this determines how the cursor behaves in the map.

Shared

Enable the Shared option to apply the properties of a previously created edit control or to create a new shared edit control. Disable it, if you want to define the properties of the edit text control uniquely.

Type

With Shared enabled, you can use the Type: list to select the shared edit control whose properties you want to apply. If creating a new shared edit control, specify the name under which it will be known.

Edit single/multi line

Define whether single-line or multi-line text editing is possible

Clear first

Enable this to display the database default value for the field. Disable it to retain the previously entered value for the field

Prompt

Enable this to display a drop-down arrow one space to the right of the edit control, simulating a combo control. Clicking on the arrow or pressing <Ctrl+P> causes any correctly attached multiple choice map to be displayed.

Function Key

Enable this to allow special action to be taken with function keys, such as taking a short cut to the next menu. (In QABuild combined/Menu entry procedures, this property is automatically enabled)

When your design is complete, save the map by choosing Save from the File menu. Alternatively, use the key shortcuts <Alt + F>, <S> and <Enter>. Leave the map editor and return to the Program Editor by choosing Exit from the File option in the menu bar. Exiting can also be achieved by using <Alt + F> and <X>.

In Screen Design accept the default output method, Top of Screen, and the other defaults.