LoadSkinPreference - cCJSkinFramework

This is called to load skin preference information

Type: Procedure

Parameters: None

Syntax
Procedure LoadSkinPreference 

Call: Send LoadSkinPreference


Description

LoadSkinPreference is called to load skin preference information by setting the skin properties psSkinFile and psSkinIni. Normally this is called during application start up and it is only called when pbLoadPreference is true. It is called at the end of the skin object's construction inside of End_Construct_Object.

The method does the following:

1. It checks for a cApplication object. If not present, an error is raised.
2. It checks if the application object's pbPreserveEnvironment property is True. If not, it returns and does nothing.
3. It loads the preference settings from the registry by calling the application object's ReadString method.
4. It sets psSkinFile property based on the registry value in ../Preferences/SkinFile and the psSkinIni property based on the registy value in ../Preferences/SkinIni.

An application object must exist for this method to succeed. Because this is called during the skin object's construction, the application object must already exist (i.e., it must be created before the skin object). If you wish to use a skin object without an application object you will need to either set pbLoadPreference to false or override LoadSkinPreference so that it does not need an application object.

This can be called at any time to manually load a skin preference (even if pbLoadPreference is false). When called manually, this will set the values for psSkinFile and psSkinIni. It will not apply the skin. If you wish to apply the skin you must call ApplySkin.

SaveSkinPreference is used to save the current skin settings.

See Also

SaveSkinPreference | pbLoadPreference | psSkinFile | psSkinIni | ApplySkin