In Visual LANSA you create the interface of the application before you write the code.
| To view the form's properties, select it on the desktop or in the Outline tab. Bring the Details tab topmost. It consists of a list of properties and a list of events for of the form. The list of properties shows the name of the property on the left and its value on the right. You can change the value of any of the properties except the name of the form. You do this by selecting a property and then specifying its value. You can either type in values, or if they are predefined, you can select them from a list. |
The first property you need to change is the form's Caption property to create a title for your window:
Next make the form a bit larger than the default size:
You can keep resizing the form as required as you add controls and fields on it.
This section shows you how to add the required fields and controls to the form.
First add the #PARTNAME field which uses #SURNAME as the reference field.
To add the PARTNAME field:
In addition to the Get command button used with the partial surname field, you need these command buttons to work with the employee details:![]()
To add buttons to the form:
Next create the list view which shows the employees:![]()
To create the list view, display again the the Controls tab. Drag a list view control (PRIM_LTVW) to the form or double-click it. Now you need to create the columns for the list. To do this:
|
|
Display the Outline tab. The list view columns are named LVCL_n:
You can rename these fields if you want to use more descriptive names.
| In the Design view notice how the list view shows that a column has been added to it.
|
You will need these fields showing employee details on the form:
| To add the fields, again display the PSLMST file in the Repository tab. Drag and drop these fields to the form:
Notice that as you drag the fields to the form, they are displayed with a label specified in the field definition. Also, they are filled with sample data which indicates the required length for the field. |
Lastly, you need a status bar for showing messages:
Display the the Controls tab and drag a status bar to the form. It will automatically attach itself to the bottom of the form.
Make sure that the interface of the application corresponds to the picture shown in Create an Application at the beginning of these steps.