[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'DBCtrls' (#lcl)

# TDBLookupListBox.ListSource

Datasource with the lookup dataset for the control.

## Declaration

Source position: dbctrls.pp line 515

`published property TDBLookupListBox.ListSource : TDataSource read GetListSource write SetListSource;`

## Description

ListSource is a TDataSource property which contains the datasource component used to access the lookup dataset for the control.

Read and write access to the property value is redirected to the DataSource property in the internal TDBLookup instance used in the control. Assigning a new value to the property causes the UpdateLookup method to be called to re-initialize the TDBLookup instance and the value in the ItemIndex property.

Use ListField or ListFieldIndex to specify the field with the descriptive value displayed in the control. Use KeyField to specify the field with the value stored in the DataField for the control.

## See also

TDBLookupListBox.ListField |  | Field name with the descriptive value displayed in the listbox.
TDBLookupListBox.ListFieldIndex |  | Ordinal position of the field in the lookup dataset with the descriptive value displayed in the control.
TDBLookupListBox.KeyField |  | Field name in the lookup dataset with the value for the control.
TDBLookupListBox.DataField |  | Name for the field in the linked dataset used in the control.
TDBLookup |  | TDBLookup - used as source of data by TDBLookupListBox or TDBLookupComboBox, to find data from a lookup table.
TCustomListBox.ItemIndex |  | Ordinal position for the currently selected item, -1 if none.