Applies to
Declaration
procedure BeginUpdate;
procedure EndUpdate;
Description
These methods are used to avoid display updates while making a series of text modifications programmatically to a TPlusMemo. By surrounding your text modification operations with BeginUpdate/EndUpdate, no screen refresh will be triggered, which can result in much faster processing. Also, no scrolling will occur, as is the case with most text modification methods that result in the current editing point being scrolled in view.
These methods are cumulative: EndUpdate must occur the same number of times that BeginUpdate was called in order to return things to normal. You should take care that EndUpdate is called before returning the control to user interface elements otherwise the user will see a memo component that is frozen.
Notes
- These methods have exactly the same effect as Lines.BeginUpdate/EndUpdate and Paragraphs.BeginUpdate/EndUdpate;
- If you use the BeginUpdate/EndUpdate mechanism for the purpose of making a series of text modifications without screen flicker, but want to make the current editing point visible after those operations, call ScrollInView after the last EndUpdate.