vcl-dxribbon-dot-tdxcustomribbon-cd4504dd.md
Specifies if the Ribbon control automatically updates its appearance from the skin and palette defined application-wide.
property UseGlobalSkin: TdxDefaultBoolean read; write; default bDefault;
| Type | Default | Description |
|---|---|---|
| TdxDefaultBoolean | bDefault | bDefaultThe TdxCustomRibbon.DefaultUseGlobalSkin class property specifies if the Ribbon control automatically imports the global skin and palette settings and uses them instead of ColorSchemeName and ColorSchemeAccent properties.bTrue |
The Ribbon control automatically imports the skin and palette defined through a TdxSkinController component application-wide.
This option is useful if you need to ensure visual consistency of your application.
ColorSchemeName and ColorSchemeAccent properties define individual appearance settings for the Ribbon control. The Ribbon control ignores skin and palette settings defined in a TdxSkinController component application-wide.
This option is useful if you need to apply a different skin and palette to the Ribbon control.
|
Set the UseGlobalSkin property to bTrue or bFalse to explicitly enable or disable Ribbon synchronization with global skin and palette settings. If the Ribbon control does not automatically import global look & feel settings, you can use ColorSchemeName and ColorSchemeAccent properties to define a different appearance for your Ribbon UI.
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 UseGlobalSkin property’s default value is bDefault.
The default UseGlobalSkin property value indicates that the TdxCustomRibbon.DefaultUseGlobalSkin class property specifies if the Ribbon control automatically imports skin and palette settings defined application-wide.
See Also