TdxCustomRibbon.ColorSchemeAccent Property
Specifies the color accent (palette) for built-in Ribbon skins.
Declaration
property ColorSchemeAccent: TdxRibbonColorSchemeAccent read; write; default rcsaYellow;
Property Value
Type | Default | Description |
---|---|---|
TdxRibbonColorSchemeAccent | rcsaYellow | 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:
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;
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.
-
The following examples demonstrate all
ColorSchemeAccent
property values for an automatically generated Ribbon UI for a TdxSpreadSheet control under the following conditions:- The Style property is set to rsOffice365.
- The ColorSchemeName property is set to
'Colorful'
. - The UseGlobalSkin property is set to bFalse.
-
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.