TcxCustomEditProperties.EndUpdate(Boolean) Method
Applies all pending changes and redraws the editor after a BeginUpdate procedure call.
Declaration
procedure EndUpdate(AInvokeChanged: Boolean = True);
Parameters
Name | Type | Description |
---|---|---|
AInvokeChanged | Boolean | Optional. Specifies if the procedure call immediately applies all pending changes:
Refer to the following sections for additional information: Optional Parameter Usage Scenarios. |
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 with an omitted optional parameter 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
call, even if an exception occurs. Otherwise, the editor remains frozen and unresponsive.
Optional Parameter Usage Scenarios
The optional AInvokeChanged
parameter is designed for rare usage scenarios when you need to configure an editor while it is invisible. An EndUpdate
procedure call may force massive layout recalculations in the UI thread depending on the editor type, its content, and the number of setting changes. This process may render the application UI temporarily unresponsive when it takes a noticeable amount of time.
If the target editor is invisible during this process, you may want to re-enable change notifications and delay the time-consuming apply changes operation until the next change made after an EndUpdate
procedure call.