TDBListBox is functionally the same as TDBComboBox, but instead of a drop-down list, it displays a scrollable list of available choices. When the user selects a value at run time, the component is assigned that value. Unlike TDBComboBox, the user cannot type in an entry that is not in the list.
Here is an example of how a TDBListBox component appears at run time. Figure 4.9 TDBListBox component
While navigating through a dataset, a TDBListBox component displays values in the column by highlighting the corresponding entry in its list. If the current row's value is not defined in the Items property, no value is highlighted in the TDBListBox. Changing the selection changes the underlying value in the database column and is equivalent to typing a value in a TDBEdit component.
The IntegralHeight property controls the way the list box is displayed. If IntegralHeight is True (the default), the bottom of the list box moves up to the bottom of the last completely-displayed item in the list. If IntegralHeight is False, the bottom of the list box is determined by the ItemHeight property, and the bottom item might not be completely displayed.
Was this article helpful?