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

# TCustomDBListBox

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TCustomDBListBox - base class for TDBListBox, a data-aware listbox for presenting list information from a database

## Declaration

Source position: dbctrls.pp line 351

`type TCustomDBListBox = class(TCustomListBox)`
`procedure EditingChange();` |  | EditingChange - method for responding to a change in the Editing property
`procedure FocusRequest();` |  | FocusRequest - method for responding to a request to give this control focus
`function GetDataField;` |  | GetDataField - returns the name of the data field as a string
`function GetDataSource;` |  | GetDataSource - returns the identity of the data source
`function GetField;` |  | GetField - returns the identity of the field
`procedure SetItems(); override;` |  | SetItems - copies the specified Values into the Items property
`function GetReadOnly;` |  | GetReadOnly - fetches the ReadOnly status from the field datalink rather than using the inherited ReadOnly status
`procedure SetReadOnly();` |  | SetReadOnly - changes the datalink ReadOnly property as well as the local property, to that specified by Value
`procedure SetDataField();` |  | SetDataField - links to the field in the datalink with the given name
`procedure SetDataSource();` |  | SetDataSource - changes the attached data source to the one specified by AValue
`procedure CMGetDataLink(); message;` |  | CMGetDataLink - control message method for obtaining the data link
`protected`
`FDataLink: TFieldDataLink;` |  | FDataLink - local variable holding the identity of the field data link
`procedure DataChange(); virtual;` |  | DataChange - method for dealing with a change in the data
`procedure KeyDown(); override;` |  | KeyDown - emulate the action of pressing the specified key (makes OnKeyDown respond)
`procedure Loaded; override;`
`procedure Notification(); override;`
`procedure UpdateData(); virtual;` |  | UpdateData - method for applying any pending changes to the data
`public`
`constructor Create(); override;` |  | Create - constructor for TCustomDBListBox: calls inherited Create, makes links and sets up event handlers for data change, change in Editing status and updating data
`destructor Destroy; override;` |  | Destroy - destructor for TCustomEBListbox: frees data links then calls inherited Destroy
`procedure Click; override;` |  | Click - a procedure that allows the programmer to simulate a mouse click over the control, and initiates the same Action as that associated with the OnClick event
`procedure EditingDone; override;` |  | EditingDone - what to do when you have finished editing; calls the OnEditingDone event handler if assigned
`property Field: TField; [r]` |  | The identity of the Field to which the listbox belongs
`property DataField: String; [rw]` |  | The name of the DataField to which the listbox belongs
`property DataSource: TDataSource; [rw]` |  | The identity of the DataSource from which the lookup data will be fetched
`property ReadOnly: Boolean; [rw]` |  | ReadOnly - if True, the data can only be read but not written or edited
`end;`

## Inheritance

`TCustomDBListBox` |  | TCustomDBListBox - base class for TDBListBox, a data-aware listbox for presenting list information from a database
`TCustomListBox` |  | TCustomList Box : the base class for TListBox
`TWinControl`
`TControl`
`TLCLComponent` |  | TLCLComponent - base class for LCL components
`TComponent,IUnknown,IInterfaceComponentReference`
`TPersistent`
`TObject`

## See also

HowToUseDataAwareControls |  | HowToUseDataAwareControls - Hints for accessing databases

The latest version of this document can be found at lazarus-ccr.sourceforge.net .