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

TDBListBox.DataChange

Implements the event handler signalled when data in the linked dataset has been changed.

Declaration

Source position: dbctrls.pp line 390

protected procedure TDBListBox.DataChange(

  Sender: TObject

); override;

Arguments

Sender

  

Object for the event notification.

Description

DataChange is an overridden procedure in TDBListBox. It implements the abstract virtual method defined in the ancestor class, and updates ItemIndex to reflect the current value in the linked dataset (when available).

When DataField is an empty string, the value in ItemIndex is set to -1 to indicate that no item is selected in the control. Otherwise, the field value in the linked dataset is located in Items and its ordinal position is used in ItemIndex.

DataChange is used as the OnDataChange event handler in the TFieldDataLink instance for the control.

See also

TDBListBox.Items

  

The list of all items defined in the control.

TDBLIstBox.DataField

  

Name for the field in the linked dataset used in the control.

TFieldDataLink.FieldName

  

FieldName - the name of the attached field, stored as a string.

TFieldDataLink.Field

  

The Field to which the datalink is attached.

TCustomDBListBox.DataChange

  

Performs actions needed when the linked dataset is repositioned.

TCustomListBox.ItemIndex

  

Ordinal position for the currently selected item, -1 if none.

TDataLink.DataSource


Version 4.0 Generated 2025-05-03 Home