Skip to main content

TcxEditStyleController.Style Property

Defines style settings for multiple editors in the base (normal) state.

Declaration

property Style: TcxEditStyle read; write;

Property Value

Type Description
TcxEditStyle

Stores editor state style settings.

Remarks

Use the Style property to customize editor appearance settings in the base (normal) state. StyleDisabled, StyleFocused, StyleHot, and StyleReadOnly properties allow you to apply different appearance settings to editors in different states. The Styles property provides access to all editor types.

The base editor style accessible through the Style property defines the appearance of multiple editors in all individual states whose styles (StyleDisabled, StyleFocused, StyleHot, and StyleReadOnly properties) are unspecified.

Note

StyleHot and StyleReadOnly properties are ignored if Style.HotTrack and Style.ReadOnly properties are set to False.

Base (Normal State) Style Settings

For instance, you can use Style.Font, Style.TextColor, and Style.TextStyle to customize text appearance in affected editors. The Style.LookAndFeel property allows you to apply different skins and palettes to affected editors.

Refer to the TcxEditStyle class description for detailed information on all available options.

Individual Editor Style Settings

To customize normal state appearance of an individual editor, use its Style property. All appearance settings accessible through the Style property of an individual editor have higher priority than corresponding settings accessible through the style controller component’s Style property.

Code Example: Override Global Appearance Settings 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