TcxCustomEditProperties.BeginUpdate Method
Postpones all editor redraw operations that reflect any editor setting change until an EndUpdate procedure call.
Declaration
procedure BeginUpdate;
Remarks
Every time you change an editor setting, the editor redraws its content to reflect the change. Enclose multiple editor setting changes between BeginUpdate
and EndUpdate procedure calls to avoid UI flickering due to excessive redraw operations and improve performance.
BeginUpdate/EndUpdate Calls and Batch Changes
A BeginUpdate
procedure call disables notifications and postpones all changes until an EndUpdate call. A consequent EndUpdate call does the following:
- Re-enables change notifications and corresponding redraw operations
- Applies all changes made after a
BeginUpdate
call - Sends corresponding notifications in a batch and raises the OnPropertiesChanged event
- Redraws the editor
Note
Ensure that every BeginUpdate
procedure call is followed by an EndUpdate procedure call, even if an exception occurs. Otherwise, the editor remains frozen and unresponsive.
See Also