TdxCustomPreview.BeginUpdate Method
Disables repainting of the document view until the EndUpdate or CancelUpdate procedure is called.
Declaration
procedure BeginUpdate;
Remarks
Each time the document view is changed (due to scrolling, zooming, rotation, navigation, etc.), the viewer area is repainted to reflect the changes. Therefore, performing multiple changes at once results in a sequence of multiple repainting operations. To improve performance in such cases, enclose the code that modifies the document view within the BeginUpdate/EndUpdate blocks. Calling the CancelUpdate procedure instead of EndUpdate discards all the pending visual changes.
The BeginUpdate procedure postpones document view changes. To apply all the pending changes, call the EndUpdate procedure. To re-enable updating of the document view without immediate repainting, call the CancelUpdate procedure instead. Ensure that every call to BeginUpdate is followed by a call to the EndUpdate or CancelUpdate procedure, even if an exception occurs.