Skip to main content

TcxTreeListStyles.StyleSheet Property

Specifies the style sheet for the current style collection.

Declaration

property StyleSheet;

Property Value

Type
TcxCustomStyleSheet

Remarks

The style collection provides multiple attributes that control the appearance of different control elements. It contains, for instance, BandBackground, Content, and Footer properties specifying the styles for the control’s background, cells and footer panel respectively. Assigning a style directly to the TreeList element overrides the style sheet settings. For instance, assigning the TreeList.Styles.BandBackground property overrides the TreeList.Styles.StyleSheet.BandBackground property settings.

Thus, a style sheet represents another collection of styles to be assigned to TcxTreeListStyles.

Once a style sheet is created and modified as required, 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.

Generally, 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 provides the ability to create a style sheet of a specific type, modify its properties, add predefined style sheets, load from and save style sheets to an INI file.

See Also