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

# TDBListBox.DoSelectionChange

Performs actions needed when the current selection in the listbox control is changed.

## Declaration

Source position: dbctrls.pp line 391

`protected procedure TDBListBox.DoSelectionChange(`
`User: Boolean`
`); override;`

## Arguments

`User` |  | Indicates if the change results from user interaction with the control.

## Description

DoSelectionChange is an overridden procedure in TDBLIstBox. It provides support for changing the modified status for the linked dataset when a new item is selected in the listbox.

User indicates if the change was performed by user interaction with the listbox, as opposed to a programmatic change from methods or messages in the class. When User is True, the internal TFieldDataLink instance is used to edit and set the Modified property in the linked dataset. When User is False, the inherited DoSelectionChange method is called.

DoSelectionChange is used in the implementation of methods in the ancestor class, like LMSelChange and SelectAll.

## See also

TCustomListBox.SelectAll
TFieldDataLink.CanModify |  | True if the linked field is capable of being modified.
TFieldDataLink.Edit |  | Edit - if the field can be modified, performs inherited Edit and shows editing status.
TFieldDataLink.Modified |  | Updates the class when the linked dataset enters an edit state.
TFieldDataLink.OnDataChange |  | Event handler signalled when the field data link has been changed.
TDBListBox.DataChange |  | Implements the event handler signalled when data in the linked dataset has been changed.
TCustomListBox.DoSelectionChange |  | Signals the OnSelectionChange handler.