Step 7. Create a Multilingual Test Form

Note: To complete this step, you must have completed Step 6 and created three new multilingual variables.

1.  From the File menu, create a New / Basic Form:

     Name:iiiMultilingualTest.

     Description: Multilingual Test

 

2.  Replace all your code with the following:

Function Options(*DIRECT)

Begin_Com Role(*EXTENDS #PRIM_FORM) Clientheight(334) Clientwidth(550) Height(373) Left(612) Top(205) Width(566)

Define_Com Class(#PRIM_TAB) Name(#TAB_1) Bottomlayoutpriority(4) Componentversion(1) Displayposition(1) Height(241) Left(8) Leftlayoutpriority(1) Parent(#COM_OWNER) Rightlayoutpriority(2) Tabposition(1) Top(8) Toplayoutpriority(3) Width(505)

Define_Com Class(#PRIM_STBR) Name(#STBR_1) Displayposition(2) Height(24) Left(0) Messageposition(1) Parent(#COM_OWNER) Tabposition(2) Tabstop(False) Top(310) Width(550)

Define_Com Class(#PRIM_PHBN) Name(#FIND) Displayposition(3) Left(16) Parent(#COM_OWNER) Tabposition(3) Top(264) Caption(*MTXTIIIFIND)

Define_Com Class(#PRIM_TBSH) Name(#Tabsheet1) Displayposition(1) Height(217) Left(0) Parent(#TAB_1) Tabposition(1) Top(24) Width(505) Caption(*MTXTIIIDETAILS)

Define_Com Class(#PRIM_TBSH) Name(#Tabsheet2) Displayposition(2) Height(217) Left(0) Parent(#TAB_1) Tabposition(2) Top(24) Width(505) Caption(*MTXTIIIADDRESS)

Define_Com Class(#xEmployeeSurname.VisualEdit) Name(#xEmployeeSurname) Displayposition(3) Left(13) Parent(#Tabsheet1) Tabposition(1) Top(48) Width(452)

Define_Com Class(#xEmployeeGivenNames.VisualEdit) Name(#xEmployeeGivenNames) Caption(*MTXTIIIDETAILS) Displayposition(2) Left(13) Parent(#Tabsheet1) Tabposition(3) Top(78) Width(452)

Define_Com Class(#xEmployeeStreet.Visual) Name(#xEmployeeStreet) Displayposition(1) Height(21) Parent(#Tabsheet2) Tabposition(1) Top(16) Width(441) Left(8)

Define_Com Class(#xEmployeeCity.Visual) Name(#xEmployeeCity) Displayposition(2) Height(21) Parent(#Tabsheet2) Tabposition(2) Top(42) Width(441) Left(8)

Define_Com Class(#xEmployeeState.Visual) Name(#xEmployeeState) Displayposition(3) Height(21) Parent(#Tabsheet2) Tabposition(3) Top(69) Width(433) Left(10)

Define_Com Class(#xEmployeePostalCode.Visual) Name(#xEmployeePostalCode) Displayposition(4) Height(21) Parent(#Tabsheet2) Tabposition(4) Top(96) Width(249) Left(10)

Define_Com Class(#xEmployeeIdentification.Visual) Name(#xemployeeindentification) Displayposition(1) Height(21) Left(13) Parent(#Tabsheet1) Tabposition(2) Top(21) Width(364)

Evtroutine Handling(#com_owner.Initialize)

Set Com(#com_owner) Caption(*component_desc)

Endroutine

Evtroutine Handling(#FIND.Click)

Fetch Fields(*all) From_File(xEmployee) With_Key(#xemployeeindentification)

Endroutine

End_Com 

3.  Save your form.

4.  Switch to the Design tab.

a.  Select the push button. On the Details tab changes its Caption to *MTXTiiiFIND, by selecting it using the ellipsis button and Repository Find dialog. Remember your multilingual variable name begins III, where III is your initials.

b.  Select the first Tab Sheet (contains Employee Number). Click first on the tab, and then in the middle of the sheet to select it. Set its Caption to *MTXTiiiDETAILS.

c.  Select the second Tab Sheet (contains Address Line 1) and set its Caption to *MTXTiiiADDRESS.

5.  Compile the form.

6.  Execute form iiiMultiLingualTest from the development environment. The Employee ID has values such as 100066, 100554, 101375 and 102015.

     This is running the form using the English language and it should look like the following:

7.  From the LANSA desktop folder, open the Execute Applications folder and double click the Execute Form icon
or select LANSA / Exec Form from the Windows start menu.

     Change the Language to FRA for the French language. Since you have just executed the form from the development environment, the Form Name in this dialog will already contain the Identifier for your iiiMultilingualTest form.

8.  Click OK to execute the form and retrieve an employee record.

     Note: