Step 1 Create Transfer Section to Department Command Handler

VLF Windows Application Development

Step 1. Create Transfer Section to Department Command Handler

VFW110 – Simple Drag and Drop

1.  Create a new Reusable Part / Panel:

     Name: iiiVFW34

     Description: Transfer Section to Department

2.  Give the reusable part an ancestor of VF_AC010

3.  Using the Design tab, give the panel iiiVFW33 a Vertical Split manager.

4.  Open the Layout Helper tab (Home ribbon / Views). Give the Vertical Splitter a Divider Style of Raised.

5.  Change the Name of PANL_1 to LEFT, and change the Name of PANL_2 to RIGHT.

6.  Select the LEFT panel. On the Design ribbon, give the panel and Attachment manager..

7.  Drop a Panel component onto the top of the LEFT panel and change its Name to TOP_LEFT.

8.  Drop a Panel onto the bottom of the LEFT panel and change its Name to BOTTOM_LEFT.

9.  Adjust the height of TOP_LEFT and BOTTOM_LEFT as required.

10. Drop a List View into the center of the panel LEFT. Change its Name to DRAG_FROM.

11. Save your reusable part.

12. Select the RIGHT panel and give it an Attachment manager.

13. Drop a Panel onto the top of the RIGHT panel and change its Name to TOP_RIGHT.

14. Drop a Panel onto the bottom of the RIGHT panel and change its Name to BOTTOM_RIGHT

15. Adjust the height of TOP_RIGHT and BOTTOM_RIGHT as necessary.

16. Drop a List View into the center of the RIGHT panel and change its Name to DRAG_TO.

17. Save your reusable part.

18. Drop a Label onto the TOP_LEFT panel.

a.  Change its Text to Drag Sections from Here

b.  Give it a VisualStyle of VS_LAREM

c.  Resize the Label as necessary.

Hint: To quickly make the label fit the TOP_LEFT panel, give the label a Height of 22.

19. Follow the same procedure as 19. (above) to add a label for 'Department Sections' to the TOP_RIGHT panel.

20. Locate the file SECTAB on the Repository tab. Drag the fields DEPTMENT, SECTION and SECDESC into the DRAG_FROM list view. Change the WidthType for the SECDESC column to Remainder.

21. Change the DragStyle of the DRAG_FROM list, to Automatic. This list will now allow drag and drop.

22. Add a Push Button to the BOTTOM_LEFT panel.

a.  Change its Caption to Refresh

b.  Change its Name to PHBN_REFRESH

c.  Create a Click event for the button.

23.  Drag the fields STD_CODE and STD_DESC and STD_CODEL into the DRAG_TO list view.

a.  Make the WidthType for the STD_DESC column, to Remainder.

b.  Change the Caption for the STD_CODE column to Section. Change CaptionType to Caption.

c.  Change the Caption for the STD_DESC column to Section Description. Change CaptionType to Caption.

d.  Change the column for STD_CODEL to Visible False.

24.  Change the DragStyle for list DRAG_TO, to Automatic.

25.  Add a Push Button to the BOTTOM_RIGHT panel.

a.  Change its Caption to Save to Section Table

b.  Change its Name to PHBN_SAVE.

c.  Create a Click event for it.

26.  Save your reusable part.