TDBLookupComboBox

This is an old revision of TDBLookupComboBox, edited by BigChimp at . The current revision is 86120.

Need this page to explain "single" vs "double" data bound use

Template:Translate

Definition

Unit: Lazarus DbCtrls

Official documentation: TDBLookupComboBox

Description

A (doubly) data-bound combobox. The TDBLookupCombobox control gets a list of values from its ListSource (which e.g. represents a table with product info, "Products"). It then

The combobox stores the result (i.e. the KeyField value in the DataField, e.g. the "ProductID" field in the DataSource property (e.g. an "Orders" table).

The difference with the TDBComboBox is that the DBComboBox is a (as it were) "singly data bound control": it stores the results in a database fields but the list of values to select from is supplied by code/via the Object Inspector.

Unbound use

You can get the combobox to look up values from a table without storing the results by leaving the DataSource and the KeyField properties empty.