TdxCustomLayoutControl.CancelUpdate Method
Enables updates to the layout control’s View.
Declaration
procedure CancelUpdate;
Remarks
When performing several updates to the layout control simultaneously, it makes sense to prevent changes to the View until updates are complete. For this purpose, use the BeginUpdate method. This method locks the control, increasing overall performance and preventing the View from flickering.
After completing the updates, a lock must be released to enable View refresh. This operation can be performed using either the EndUpdate or CancelUpdate method. The difference between these methods is that the EndUpdate method also forces the control to invalidate itself, while the CancelUpdate method only releases a lock.
Since the execution of updates can exit with either a normal or exception state, these updates and the CancelUpdate method should be contained within try… finally… blocks following the BeginUpdate method, to ensure that the lock will be released in all cases.