Skip to main content

TdxBasicAction.BeginUpdate Method

Prevents updating the UI elements linked to the action object until the EndUpdate procedure is called.

Declaration

procedure BeginUpdate;

Remarks

If there are multiple client controls associated with the current action object, you can use the BeginUpdate and EndUpdate procedures to improve performance every time the action’s state is changed.

An internal counter is used to determine whether the action object’s state is locked. All client controls associated with the action object can be updated in response to its state, caption, and/or hint changes only if the internal counter value is 0. Each call to the BeginUpdate procedure increments the internal counter by one while each call to EndUpdate/CancelUpdate decrements it by one.

Ensure that every call to BeginUpdate is followed by a call to the EndUpdate/CancelUpdate procedure, even if an exception occurs.

See Also