TdxRibbonSkinSelectorBaseOptions.CancelUpdate Method
Re-enables change notifications and delays pending changes made in the Ribbon Skin Selector after a BeginUpdate procedure call until the next setting change.
Declaration
procedure CancelUpdate; virtual;
Remarks
Every time you modify skin selector settings, the parent Ribbon Skin Selector redraws itself to reflect the change. Enclose multiple setting changes between BeginUpdate and EndUpdate procedure calls to avoid UI flickering due to excessive redraw operations and improve performance.
BeginUpdate/CancelUpdate and Batch Changes
A BeginUpdate procedure call disables notifications and postpones all changes until an EndUpdate call. Unlike EndUpdate, the CancelUpdate
procedure does not apply pending changes to the skin selector component’s appearance. CancelUpdate
only re-enables change notifications and corresponding redraw operations. The skin selector applies pending changes made between BeginUpdate and EndUpdate calls with the next content or appearance change.
Note
Ensure that every BeginUpdate procedure call is followed by an EndUpdate or CancelUpdate
procedure call, even if an exception occurs. Otherwise, the Ribbon Skin Selector remains frozen and unresponsive.
CancelUpdate Usage Scenarios
The CancelUpdate
procedure is designed for rare usage scenarios when you need to configure a Ribbon Skin Selector while it is invisible. The EndUpdate procedure forces massive recalculations in the UI thread that may take a noticeable amount of time and render the application UI temporarily unresponsive.
If the component 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 a CancelUpdate
procedure call.