VFW050 Basic Combo Box Processing

VLF Windows Application Development

VFW050 – Basic Combo Box Processing

Introduction

The combo box is a simple list component. There are a number of other list components available such as List View, Grid and Tree View.

This exercise introduces a combo box (or dropdown) by adding it directly onto a panel and then adding logic to populate it with values and position it to an entry, when necessary. As you will see in a later exercise, you will often decide to create a reusable part which supports one or more linked combo boxes. This will simplify your application coding and enable the combo box logic to be written once and re-used.

A combo box typically displays a list of descriptions (such as Department Description). However your program logic will require the associated department code. Typically the combo box has one visible column containing descriptions and a hidden column containing the associated code.

When an entry in a list component is selected, your program variables are automatically populated from the selected row.

Objective

  • To enhance the Employee Details command handler (iiiVFW06) using a combo box.

To achieve this objective you will complete the following:

Step 1. Add a Combo Box to the Panel

Step 2. Set up the Combo Box

Step 3. Test the Combo Box

Summary

Before You Begin

Complete exercises VFW030, VFW040 and VFW042.