Skip to main content

TdxCustomPreview.EndUpdate Method

Enables repainting of the document view after a call to the BeginUpdate procedure.

Declaration

procedure EndUpdate;

Remarks

Each time the displayed 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.

See Also