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

TCustomImageList.BeginUpdate

Starts an update to the image list, and controls execution of the OnChange event.

Declaration

Source position: imglist.pp line 339

public procedure TCustomImageList.BeginUpdate;

Description

Call BeginUpdate when an update to the image list is started to control execution of the OnChange event handler in Change.

BeginUpdate is used, along with EndUpdate, to speed up the insertion or modification of images in an image list. Every call to BeginUpdate must be matched by a call to EndUpdate; i. e. update operations can be nested.

BeginUpdate increments an internal counter in the class instance each time the method is called. The DoAfterUpdateStarted method is called to perform any actions needed in the image list when an update is started. It is called when the internal counter is set to 1; subsequent calls to BeginUpdate do not call DoAfterUpdateStarted until the update count has returned to 1.

EndUpdate is used to perform action needed when an update is completed and to decrement the internal update counter. When the counter contains a positive non-zero value, the OnChange event handler is not executed when the image list is changed.

Version info

Modified in LCL version 3.0 to call the DoAfterUpdateStarted method.

See also

TCustomImageList.EndUpdate

  

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

TCustomImageList.OnChange

  

Event handler signalled when the image list is changed.

TCustomImageList.Change

  

Sends change notifications when the image list is updated.

TCustomImageList.MarkAsChanged

  

Sets the value in the internal Changed flag to True.

TCustomImageList.DoAfterUpdateStarted

  

Performs actions needed after the BeginUpdate method is started.

TCustomImageList.DoBeforeUpdateEnded

  

Performs actions needed before the EndUpdate method is completed.


Version 3.2 Generated 2024-02-25 Home