Back to Devexpress

TdxCustomRibbon.ColorSchemeAccent Property

vcl-dxribbon-dot-tdxcustomribbon-84eab3ef.md

latest5.0 KB
Original Source

TdxCustomRibbon.ColorSchemeAccent Property

Specifies the color accent (palette) for built-in Ribbon skins.

Declaration

delphi
property ColorSchemeAccent: TdxRibbonColorSchemeAccent read; write; default rcsaYellow;

Property Value

TypeDefaultDescription
TdxRibbonColorSchemeAccentrcsaYellow

The active Ribbon color accent.

|

Remarks

You can use the ColorSchemeAccent property to switch between five Microsoft Office-inspired color accents for the Ribbon UI if you assigned the name of one of the built-in Ribbon skins to the ColorSchemeName property.

Available Options

You can assign the following color scheme accents[1] to the ColorSchemeAccent property:

rcsaYellow (default) rcsaBlue rcsaGreen rcsaOrange rcsaPurple

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:

delphi
uses
  dxRibbon; // 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;
cpp
#include "dxRibbon.hpp" // Declares the TdxRibbon class
// ...
void __fastcall TMyForm::FormCreate(TObject *Sender)
{
  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
  }
}

Limitations

The ColorSchemeAccent property value affects only built-in Ribbon skins. The ColorSchemeAccent property does not correspond to the global palette specified through the TcxCustomLookAndFeelController.SkinPaletteName property.

If the Ribbon control uses the active global vector skin, its palette always affects the Ribbon control. If you use the ColorSchemeName property to apply a common[2] vector DevExpress skin (TheBezier, for example) to the Ribbon control as an individual skin, you cannot switch between palettes of the skin.

Default Value

The ColorSchemeAccent property’s default value is rcsaYellow.

Footnotes

  1. The following examples demonstrate all ColorSchemeAccent property values for an automatically generated Ribbon UI for a TdxSpreadSheet control under the following conditions:

  2. You can apply skins from the same list available for the TdxSkinController component. Refer to the TcxCustomLookAndFeelController.SkinName property description for the full list of available common DevExpress skins.

See Also

TdxCustomRibbon.ColorSchemeName Property

TdxCustomRibbon.UseGlobalSkin Property

TdxCustomRibbon Class

TdxCustomRibbon Members

dxRibbon Unit