Step 2 Create Brief Notes Command Handler

VLF Windows Application Development

Step 2. Create Brief Notes Command Handler

VFW054 – Edit Text in a Memo / Edit Box

1.  Create a new Reusable Part / Panel:

     Name: iiiVFW08

     Description: Employee Brief Notes

2.  Give the reusable part an ancestor of VF_AC010

3.  Select the Design ribbon. Give the component an Attachment manager.

4.  Drop a Panel onto the right hand side. Give this panel the Name, BUTTON_PANL. Adjust the width so that it can contain push buttons.

5.  Drop a Multi-line edit box onto the center of the left hand area.

6.  Open the Layout Helper tab. If necessary, select it from the Views button on Home ribbon.

     Select iiiVFW08 in the Layout Managed Component dropdown and select the Child Details tab. Check the Child Details are correctly defined.

a.  BUTTON_PANL should be Right

b.  MEMO_1 should be Centre.

c.  Select the BUTTON_PANL and give it a Flow Down manager.

d.  On the Layout Manager tab. On the As Child Details tab, select the Category  / Margins and use the All to set margins of 6 pixels.

7.  Drop two push buttons onto the BUTTON_PANL.

a.  Name the first PHBN_SAVE with a Caption of Save.

b.  Name the second PHBN_DLT with a Caption of Delete.

8.  Save your changes.

9.  Locate your Employee Notes file on the Repository tab.

     Drop the field iiiNTELNE onto the Memo box.

     The Multi-line edit box has columns just like other list components. You have just created column MECL_1.

10. Drop the field iiiNTESQN onto the Memo box.

     At this point the new column MECL_2 should be selected. Use the Details tab to check its ColumnRole property. Since this is a numeric field it should have been automatically set to LineNumber.

     The Memo box will set this line number column as each line is created. This enables application code to be simplified, when writing the note data to a file. The sequence number will ensure the text is restored to the memo box in the same sequence.

11. Drop field iiiLneCnt onto the Memo box. Once again check this column's ColumnRole which should be LineContinuation.

12. Select the Memo box and set its properties as follows

Property

Value

WordWrap

True

AddEntryMode

MultiplePerLine

MaximumLineLength

20,000

 

The Memo box component will increment line count (iiiLneCnt) as text is added.