The SkinCollection object is a collection providing access to all skins
defined on the server. See Changing button images using skins
help topic for information about skins.
The SkinCollection object allows you to perform the following tasks:
The SkinCollection object is a standard OLE Automation collection object.
To access SkinCollection object you need to retrieve it using the Skins property of Server object.
Set SkinColl=P2F.Skins |
Name | Type | Parameters | Description |
---|---|---|---|
item |
Skin object | SkinName:String or Number | Returns a Skin object with the given name or at the given position. If the parameter is of string type, it is interpreted as a skin name and the skin with the specified name is returned. If the parameter is of number type, it is interpreted as an ordinal position and the skin at this position is returned. The ordinal number must lie between 1 and the value of Count property. |
Integer | Returns the number of skins defined in the system. |
The following VBScript example retrieves a skin named "MySkin":
Set MySkin=SkinColl("MySkin") |
For I=1 To SkinColl.Count MsgBox SkinColl.item(I).Name Next |
For Each Skin in SkinColl MsgBox Skin.Name Next |
Adds a new empty skin.
Add (SkinName)
Name | Type | Description |
---|---|---|
SkinName | String | The name you want to assign to the new skin. Each skin must have a unique name. |
This method creates a new skin, adds it to the collection and returns a Skin object representing the skin. Then you may setup skin properties using this object reference.
The following example creates a new skin, sets a logo URL and saves the skin:
Set MySkin=SkinColl.Add("MySkin") MySkin.LogoURL="http://mysite.com" MySkin.ApplyChanges |
Method deletes a skin with the given name.
Delete (SkinName)
Name | Type | Description |
---|---|---|
SkinName | String | The name of the skin to delete. |
The following example deletes the skin named "MySkin":
SkinColl.Delete("MySkin") |
Method renames a skin.
RenameSkin (SkinObject, NewName)
Name | Type | Description |
---|---|---|
SkinObject | Skin | A reference to the Skin object which name you want to change. |
NewName | String | New skin name. |
The following example gives the skin named "MySkin" a new name "NewSkin":
Set MySkin=SkinColl("MySkin") SkinColl.RenameSkin(MySkin,"NewSkin") |