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).
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;
See Also