TdxCustomLayoutControl.BeginUpdate Method
Disables ExpressLayout Control refresh operations.
Declaration
procedure BeginUpdate;
Remarks
Calling the BeginUpdate method disables ExpressLayout Control repainting. If the BeginUpdate procedure has been called, any changes to groups (or items) are not refreshed until calling the EndUpdate (CancelUpdate) method. The BeginUpdate and EndUpdate (CancelUpdate) methods work together to prevent numerous updates of the ExpressLayout Control when adding groups, items or regrouping.
Remember 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 this counter by one. The ExpressLayout Control can refresh itself only when the internal counter is 0. Assume you need to add several items programmatically. If you do not use the BeginUpdate and EndUpdate (CancelUpdate) methods, the ExpressLayout Control redraws itself as many times as the number of added items. Instead of prolonged delays, you can use the BeginUpdate method before adding the first item and the EndUpdate method after adding the last item; thus, the control redraws itself only once.