How to Use a Combo Box

Top  Previous  Next

This topic describes how to use a combo box without using the File Drop Combo Control template. For information on using the template, see File Drop Combo control template .

There are two ways to use a combo box--for a static list and for a list of choices from a file.

For a finite list of static choices:

1.

Place a COMBO control on the window.

2.

In the Properties dialog, select the USE variable for it to update.

3.

Press the Cancel button to close the List Box Formatter (no need to use it).

4.

RIGHT-CLICK the combo box, then choose Properties.

5.

In the From field, type the list of choices as a string constant (in single quotes with | separating choices), eg 'One|Two|Three'

6.

Enter a numeric value into the Drop field.

This the number of rows displayed at one time by the drop down list.

7.

Enter the correct picture token in the Picture field.

8.

Press the OK button.

For a list of choices from a file:

1.

On the Procedure Properties dialog, press the Data button.

2.

Add a QUEUE to the local data.

3.

Add a single field to the QUEUE to hold the data from the file.

4.

Return to the Procedure Properties dialog, then press the Window button.

5.

Place a COMBO control on the window.

6.

In the Select Field dialog, select the USE variable for it to update.

7.

Press the Cancel button to get out of the List Box Formatter (no need to use it).

8.

RIGHT-CLICK then choose Properties.

9.

Type the name of the QUEUE into the FROM field, or press the ellipsis button to select or define a QUEUE.

10.

Enter a numeric value into the Drop field.

This the number of rows displayed at one time by the drop down list.

11.

Enter the correct picture token in the Picture field.

12.

Press the OK button.

13.

Return to the Procedure Properties dialog, then press the Embeds button.

14.

Open the Procedure Setup embed point and add code to open the file and build the COMBO control's QUEUE.

15.

Open the End of Procedure embed point and add code to close the file and FREE the QUEUE.