List Box

A list box is a rectangular list from which an end user can select one or more items. A list box does not allow direct data input. If the list box contains many items, the user can navigate through it with a scroll bar.

Paged List Box

The standard list box control provides a convenient way for a program to implement a look-up facility for a group of items. It is also tempting to extend this type of use into a method for locating records in a data file. Unfortunately, this doesn't work well when the file contains too many records. The programmer runs into two main problems:

  1. The standard list box has a limited capacity, usually fewer than 2000 items.
  2. It takes too long to load the list box with the entire set of items.

Also, if the number of items is very large, the user may have a difficult time locating a particular item. There are two reasons for this:

  1. The resolution of the scroll bar's slider is too coarse.
  2. The search mechanism is too primitive (for example, a single-character match on the first byte of the record).

The paged list box is a variation of the standard list box that solves all of these problems. A paged list box works by managing only a limited number of records at a time. When it needs more records, it requests them from the controlling program. Paged list boxes are intended to be used in conjunction with a large, ordered data source, typically records stored in an indexed file.

More information about how to use paged list boxes can be found in ACUCOBOL-GT User Interface Programming.