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

# TCustomImageList.EndUpdate

Finishes an update to the image list, and calls Change.

## Declaration

Source position: imglist.pp line 340

`public procedure TCustomImageList.EndUpdate;`

## Description

EndUpdate is used to finish an update to images in the list. EndUpdate is used, along with BeginUpdate, to speed up image list updates by blocking execution of the OnChange event handler.

BeginUpdate increments an internal counter in the class instance each time the method is called. EndUpdate decrements the internal counter when called. If the modified counter contains a positive non-zero value, the OnChange event handler is not executed when the image list is changed. When the counter reaches zero (0), the Change method is called to perform OnChange notifications.

EndUpdate cannot be called more often than the BeginUpdate method. If the method would cause the internal counter to contain a negative value, the RaiseGDBException method is called to raise an exception for the condition.

EndUpdate calls the DoBeforeUpdateEnded method to perform any actions needed when the internal update counter is set to 1. The value in the internal counter is decremented, and the Change method is called prior to exit. Change notifications and the OnChange event handler occur when there are no other nested BeginUpdate calls active.

## Version info

Modified in LCL version 3.0 to call the DoBeforeUpdateEnded method.

## See also

TCustomImageList.BeginUpdate |  | Starts an update to the image list, and controls execution of the OnChange event.
TCustomImageList.Change |  | Sends change notifications when the image list is updated.
TCustomImageList.OnChange |  | Event handler signalled when the image list is changed.
TCustomImageList.DoBeforeUpdateEnded |  | Performs actions needed before the EndUpdate method is completed.
TCustomImageList.DoAfterUpdateStarted |  | Performs actions needed after the BeginUpdate method is started.
TCustomImageList.MarkAsChanged |  | Sets the value in the internal Changed flag to True.