TdxCustomLayoutControl.EndUpdate(Boolean) Method
Enables refresh operations on the layout control, and invalidates the control.
Declaration
procedure EndUpdate(ANeedPack: Boolean = True);
Parameters
Name | Type |
---|---|
ANeedPack | Boolean |
Remarks
The BeginUpdate and EndUpdate (CancelUpdate) methods work together to prevent numerous updates of the ExpressLayout Control when adding groups or items. Make certain to call the EndUpdate (CancelUpdate) method after calling BeginUpdate. Every call of the BeginUpdate method increases the internal counter by one. Every call of the EndUpdate (CancelUpdate) method decreases the internal counter by one. The ExpressLayout Control refreshes itself only when the internal counter is 0.
Since the execution of updates can exit with either a normal or exception state, these updates and the EndUpdate method should be contained within try… finally… blocks following the BeginUpdate method to ensure that View updates will be enabled in all cases.
To enable View updates without the control invalidation, use the CancelUpdate method.