Skip to main content

dxSkinsUserSkinLoadFromFileByIndex(string,Integer) Method

Loads a skin from a specified file by its index.

Declaration

function dxSkinsUserSkinLoadFromFileByIndex(const AFileName: string; ASkinIndex: Integer = 0): Boolean;

Parameters

Name Type
AFileName string
ASkinIndex Integer

Returns

Type
Boolean

Remarks

If the skin controller’s SkinName property is set to 'UserSkin', you need to provide a skin to be applied by this skin controller. To accomplish this, call the dxSkinsUserSkinLoadFromFileByIndex or dxSkinsUserSkinLoadFromFile function to load a skin from a .SKINRES file saved in the Skin Editor.

AFileName specifies the source file (a SKINRES file created in the Skin Editor).

ASkinIndex specifies the skin index within the storage. If ASkinIndex is not specified the function loads the first skin from the storage.

The dxSkinsUserSkinLoadFromFileByIndex function returns False, if the specified skin doesn’t exist or it cannot be loaded.

To load a skin from a stream, call the dxSkinsUserSkinLoadFromStream or dxSkinsUserSkinLoadFromStreamByIndex function.

See Also