Skip to main content

LoadStyleSheetsFromIniFile(string,TcxStyleRepository,TcxCustomStyleSheetClass,TStrings,TComponent,TList,TcxStyleGetName) Method

Loads style sheets from an INI file.

Declaration

procedure LoadStyleSheetsFromIniFile(const AIniFileName: string; AStyleRepository: TcxStyleRepository; AStyleSheetClass: TcxCustomStyleSheetClass; const AStyleSheetNames: TStrings = nil; AOwner: TComponent = nil; const AStyleSheetList: TList = nil; AStyleGetName: TcxStyleGetName = nil);

Parameters

Name Type
AIniFileName string
AStyleRepository TcxStyleRepository
AStyleSheetClass TcxCustomStyleSheetClass
AStyleSheetNames TStrings
AOwner TComponent
AStyleSheetList TList
AStyleGetName TcxStyleGetName

Remarks

The LoadStyleSheetsFromIniFile method loads style sheets into a style repository determined by the AStyleRepository parameter from the INI file with the name specified by the AIniFileName parameter.

The AStyleSheetClass parameter determines the class of style sheet(s) to create when loading from a file. Using the AStyleSheetNames parameter, you can specify the names of the style sheets to load. If it is set to nil, all style sheets are loaded from the file.

Note

all style sheets created by the LoadStyleSheetsFromIniFile procedure will be the same class as defined by AStyleSheetClass.

The INI file stores information on a style sheet in the following format:

[Style Sheet Caption]

Style1=Values

Style2=Values

If the class defined by AStyleSheetClass does not contain specific styles loaded from a particular section of the INI file, these styles are ignored. All other styles are used to set values for style properties of a new style sheet.

You can use the AStyleSheetList parameter to add all loaded style sheets to an external list, but this is used at design time mainly. The AStyleGetName parameter is for internal use only.

See Also