Step 3. Add field xEmployeeTitle to the Editor (copy of II_EDIT)

1.  Open the Editor component in the editor.

2.  On the Repository tab, locate the file xEmployee and expand its definition. Drag the field xEmployeeTitle onto the panel, below field Monthly Salary.

3.  With the field xEmployeeTitle selected, select the Layout ribbon and give it a LayoutItem of Top, a Size of Content Width and Item Margins on all sides of 5. Your design should look like the following:


4.  Using the Details / Events tab, create a Changed event routine for field xEmployeeTitle.

5.  Add code to the xEmployeeTitle.Changed event to set the Document p_TITLE property to the value xEmployeeTitle. Your code should look like the following:

Evtroutine Handling(#xEmployeeTitle.Changed) Options(*NOCLEARMESSAGES *NOCLEARERRORS)


#Document.p_TITLE := #xEmployeeTitle


#EditorModified := True


Signal Event(Changed)



6.  Add code to Initialize routine to show Employee Title. Your code should look like the following:

#xEmployeeTitle := #Document.p_TITLE

7.  Compile your copy of the Editor component.