TcxCustomStyles.StyleSheet Property
Specifies the style sheet for the current style collection.
Declaration
property StyleSheet: TcxCustomStyleSheet read; write;
Property Value
Type |
---|
TcxCustomStyleSheet |
Remarks
The StyleSheet property specifies the style sheet for the style collection provided by the current TcxCustomStyles object.
A style collection provides multiple attributes that control the appearance of different elements of a control. The TcxGridTableViewStyles collection, for instance, contains the Background, Content, Footer properties specifying styles for the view’s background, data cells and footer panel respectively. A corresponding style sheet (TcxGridTableViewStyleSheet) contains the same style attributes. If a style sheet, which is not set, is assigned to the style property within the style collection, the value of this property is determined by the corresponding property of the style sheet. Thus, a style sheet represents another collection of styles to be assigned to TcxCustomStyles.
Once a style sheet is created and adjusted according to your preferences, it can be used in different applications over and over again. Style sheets can be saved to an INI file by the SaveStyleSheetsToIniFile procedure and can be loaded from this file via LoadStyleSheetsFromIniFile.
Usually, you create a style sheet via a style repository of class TcxStyleRepository. At design time, you can create a style sheet via the style repository editor. It gives you the ability to create a style sheet of a specific type, adjust its properties, add predefined style sheets, load from and save style sheets to an INI file.