Skip to main content

TcxContainerStyle.StyleController Property

Specifies the source of style settings.

Declaration

property StyleController: TcxStyleController read; write;

Property Value

Type Description
TcxStyleController

The source style controller component.

Remarks

You can use the StyleController property to associate the base style with a style controller component (a TcxStyleController descendant instance).

VCL Shared Libraries: A Combo Box Editor with an Assigned Style Controller

Tip

You can use the Style.StyleController property to associate a style controller with another style controller.

Code Example: Change Appearance for Multiple Editors

The following code example uses a TcxEditStyleController component to override a global skin for three spin editors:

uses
  cxEdit,  // Declares the TcxEditStyleController class
  cxSpinEdit, // Declares the TcxSpinEdit class
  cxTextEdit,  // Declares the TcxTextEdit class
  dxSkinsForm; // Declares the TdxSkinController class
// ...

procedure TMyForm.FormCreate(Sender: TObject);
begin
  dxSkinController1.SkinName := 'WXICompact';  // Specifies a skin at the global level
  // Specify a different skin for an edit style controller component
  cxEditStyleController1.Style.LookAndFeel.SkinName := 'Office2019Black';
  // Associate a style controller with three spin editors
  cxSpinEdit1.Style.StyleController := cxEditStyleController1;
  cxSpinEdit2.Style.StyleController := cxEditStyleController1;
  cxSpinEdit3.Style.StyleController := cxEditStyleController1;
end;

VCL Editors Library: Global Skin Override for Multiple Editors

See Also