vcl-dxribbon-dot-tdxcustomribbon-84eab3ef.md
Specifies the color accent (palette) for built-in Ribbon skins.
property ColorSchemeAccent: TdxRibbonColorSchemeAccent read; write; default rcsaYellow;
| Type | Default | Description |
|---|---|---|
| TdxRibbonColorSchemeAccent | rcsaYellow |
The active Ribbon color accent.
|
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.
You can assign the following color scheme accents[1] to the ColorSchemeAccent property:
rcsaYellow (default) rcsaBlue rcsaGreen rcsaOrange rcsaPurple
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; // 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;
#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
}
}
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.
The ColorSchemeAccent property’s default value is rcsaYellow.
Footnotes
The following examples demonstrate all ColorSchemeAccent property values for an automatically generated Ribbon UI for a TdxSpreadSheet control under the following conditions:
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