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

TdxCustomRibbon.EndUpdate Method

Applies all pending changes and redraws the Ribbon control after a BeginUpdate procedure call.

#Declaration

Delphi
procedure EndUpdate;

#Remarks

Every time you manage Ribbon UI elements or change Ribbon control settings, the control redraws itself to reflect the change. Enclose multiple Ribbon control 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 subsequent 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
  • Redraws the Ribbon control

Note

Ensure that every BeginUpdate procedure call is followed by an EndUpdate procedure call, even if an exception occurs. Otherwise, the Ribbon UI remains frozen and unresponsive.

#Code Example: Apply Individual Ribbon Skin and Color Accent

The following code example applies the built-in Colorful skin and its Green color accent to the Ribbon control in a TdxSpreadSheet control-based application that uses the WXI global skin and its Sharpness palette:

uses
  dxRibbon;  // This unit declares the TdxRibbon class
// ...
procedure TMyForm.FormCreate(Sender: TObject);
begin
  DisableAero := True;
  dxRibbon1.BeginUpdate;  // Initiates the following batch change
  try
    dxRibbon1.UseGlobalSkin := bFalse;
    dxRibbon1.Style := rsOffice365;
    dxRibbon1.ColorSchemeName := 'Colorful';
    dxRibbon1.ColorSchemeAccent := rcsaGreen;
  finally
    dxRibbon1.EndUpdate;  // Calls EndUpdate regardless of the batch operation's success
  end;
end;

VCL Bars: Different Ribbon Look & Feel Settings

See Also