Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxCustomLayoutControl.BeginUpdate Method

In This Article

Disables ExpressLayout Control refresh operations.

#Declaration

Delphi
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.

See Also