Skip to main content
A newer version of this page is available. .

TcxEditStyleController Class

Represents the style controller which defines the style properties common to several editors.

Declaration

TcxEditStyleController = class(
    TcxStyleController
)

Remarks

The TcxEditStyleController class describes the style attributes that can be applied to several editors. Use the Style, StyleDisabled, StyleFocused, StyleHot members to specify style attributes for the normal, disabled, focused and highlighted (hot-tracked) editor state, respectively. To set a style controller to an editor, you need to assign an instance of the TcxEditStyleController class to the TcxCustomEditStyle.StyleController property.

The style controller allows you to define the style attributes common to several editors. But you can redefine individual style attributes by setting them explicitly via the editor’s TcxCustomEdit.Style, TcxCustomEdit.StyleDisabled, TcxCustomEdit.StyleFocused and TcxCustomEdit.StyleHot properties. The editor and the style controller each have the AssignedValues property, which specify whether to obtain style attributes from the editor style or from the style controller. It represents a set of flags that describe which style attributes were explicitly assigned in the editor style and the style controller, respectively. Editor style attributes have a higher priority than attributes defined in the style controller. If a specific style attribute is set both in the editor style and style controller, the editor will obtain the style attribute value from the editor style.

It is possible to connect one style controller to another style controller by setting the TcxEditStyleController.Style.StyleController property. This gives you additional flexibility when controlling editor style attributes. Attributes of the style controller have less priority than attributes of the controller to which it is connected.

Note

a default style controller provides access to default style attributes’ values for all the editors and controls that have unassigned style attributes (set to their defaults) and have no style controller assigned, i.e. when a default style controller is present and an editor or a style controller has an unassigned style attribute and has no style controller connected to itself, the corresponding default style controller’s attribute can be set via the default style controller. Use the TcxDefaultEditStyleController component to customize the style attributes’ default values for all the controls that have no individual style control assigned.

See Also