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

# TCustomListBox.LockSelectionChange

Blocks selection changes during update to the widgetset class.

## Declaration

Source position: stdctrls.pp line 625

`public procedure TCustomListBox.LockSelectionChange;`

## Description

Increments the internal counter used to track selection change events. Used in the implementation of the AssignCacheToItemData, InitializeWnd, FinalizeWnd, UpdateSelectionMode, UpdateSorted, and SetItems methods.

The value is examined when the LM_SelChange message is handled for the control.

UnlockSelectionChange is used to decrement the internal counter.

## See also

TCustomListBox.UnlockSelectionChange |  | Removes a previous selection change lock.