The List Box Form Field

List box form fields are commonly used for presenting a fixed number of choices to the application end-user from which one must be selected. They also provide a convenient mechanism for presenting these choices in the form of descriptive text rather than as codes. The available list box styles are "Manual Drop", "Automatic Drop", "Always Dropped", "Drive List", "Directory List", "File List", and Dynamic Multi-column.

Manual, Automatic and Always Dropped List Boxes

These types of listboxes are populated by the FORM SET LIST command or by a default list of strings. These types of listboxes have an assignable data type and data length. The default members of the list can be defined as a sequence of strings separated by the semi-colon (;) character. The default value for the list box can also be defined and if this value matches a member of the list, then that list item appears highlighted. The total number of members in the list can exceed this number of members. The number of visible lines for a list box defines the number of list members which are exposed.

Manual Drop

A "Manual Drop" list box exposes its list members when it gains the input focus by mouse click.

Automatic Drop

An "Automatic Drop" list box always exposes its list members when it gains the input focus by any means.

Always Dropped

An "Always Dropped" list box always has its list members exposed.

Drive, Directory and File List Boxes

These list boxes appear always dropped and are populated based upon their value (default or assigned). The number of visible lines for one of these kind of list box defines the number of list members which are exposed.

Drive List

A "Drive List" list box is presented as an "Always Dropped" list box containing a list of the hard disk drives which are currently available.

Directory List

A "Directory List" list box is presented as an "Always Dropped" list box containing a list of the file system directories which exist beneath the directory path assigned as the value of the list box. For example, if the value "C:*" were assigned to the list box, then the list box members consist of the names of the directories underneath the directory "C:

File List

A "File List" list box is presented as an "Always Dropped" list box containing a list of the files which exist within a specified directory path assigned as the value of the list box. For example, if the value "C:*" were assigned to the list box, then the list box members consists of the names of the files that exist within the directory "C:

Dynamic Multi Column List Boxes

Dynamic Multi-Column list boxes appear Always Dropped with one or more columns each with its own heading. This type of listbox must be populated using the FORM SET DYNAMICLIST command which identifies the columns of the set that are provided. Unlike the FORM SET LIST command, the FORM SET DYNAMICLIST command instructs the listbox to request data only when it is needed for display purposes. Column widths can be adjusted using a mouse to drag the boundaries between columns. A horizontal scroll bar can appear if necessary. Vertical scroll bars appear if there are more members in the set than there are visible members. The number of visible members is less than the number displayed in the List Box Edit Dialog. This is to provide room for a column heading and if necessary, a horizontal scroll bar.