RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TStringList.SetUpdateState Method

Performs internal adjustments before or after a series of updates.

Pascal
procedure SetUpdateState(Updating: Boolean); override;
C++
virtual __fastcall SetUpdateState(Boolean Updating);

SetUpdateState is called at the beginning or end of a series of updates. When the BeginUpdate method is first called and the TStrings object is not already in the middle of an update, TStrings calls SetUpdateState internally, with Updating set to true. When the EndUpdate method is called and it cancels out the last unmatched call to BeginUpdate, TStrings calls SetUpdateState internally, with Updating set to false. 

As implemented in TStrings, SetUpdateState does nothing. Descendant classes can override this method to optimize the response to updates. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!