Help Contents

Skin Object

The Skin object represents a Print2HTML5 document skin. See Changing button images using skins help topic for information about skins.

Remarks

The Skin object represents a Print2HTML5 document skin and allows you to setup programmatically all skin data that you can setup in Skin Properties window.

Object access

To obtain a Skin object corresponding to an existing skin, you need either to retrieve it from SkinCollection collection by its name:

Set MySkin=SkinColl("MySkin")
or by enumerating SkinCollection collection:  

For Each Skin in SkinColl
  // Manipulate with Skin object here
Next
To create a new skin and obtain a reference to it, you need to use Add method of SkinCollection object:  

Set MySkin=SkinColl.Add("MySkin")

Properties
 

Name Type Description
DocBgrColor Integer Document area background color. The color value is represented with RGB format. Each color component is represented by a single byte: the lowest byte corresponds to the blue component, the second byte - to the green component, and the third byte - to the red component. For example, red is 0xFF0000, green is 0x00FF00 and blue is 0x0000FF.
DownButColor Integer Pressed button background color. See DocBgrColor property for integer value description.
DownRectColor Integer Pressed button border color. See DocBgrColor property for integer value description.
HelpButtonURL String URL opened in the browser when Help button on the document toolbar is clicked.
LogoURL String URL opened in the browser when logo on the document toolbar is clicked.
Name String The name of the skin. Each skin must have a unique name. This property is read-only. To change a skin name, use RenameSkin method of SkinCollection object.
OverButColor Integer Focused button background color. See DocBgrColor property for integer value description.
OverRectColor Integer Focused button border color. See DocBgrColor property for integer value description.
TBBgrImgBehavior Integer Toolbar background image behavior. It should be set to one of the values from IMGBEHAVIOR enumeration.
TextHighlightColor Integer Text highlight color. See DocBgrColor property for integer value description.
ToolbarBgrColor Integer Toolbar background color. See DocBgrColor property for integer value description.
ZoomHandleOffset Integer Zoom slider handle vertical offset. This is the vertical offset of the zoom slider handle image relative to the position of this image centered regarding the rule image.


Methods

 

ApplyChanges

Method saves the skin to the persistent storage.

Signature

ApplyChanges()

Arguments

None

Remarks

You need to call this method if you modified some skin properties and want to save your changes so that the next time this skin object is retrieved, its properties will reflect the changes you made.

SetToolbarImage

Method sets images for toolbar background, toolbar buttons and other controls.

Signature

SetToolbarImage (ImageType, FilePath)

Arguments

Name Type Description
ImageType Integer A numeric value indicating the image to set. It should be set to one of the values from TOOLBARIMAGE enumeration.
FilePath String The path to the image file of PNG type.

Remarks

The method sets the image specified by the ImageType argument. The previously stored image of this type is deleted. The FilePath must point to a PNG file storing image data. See Changing button images using skins help topic for image specifications.

Example

The following example creates a new skin, sets some colors, logo URL, logo image and Fit Width button and Fit Page button images and saves the skin:

Set MySkin=P2H.Skins.Add("Exquisite")
MySkin.ToolbarBgrColor=&HF5F5DC
MySkin.DownButColor=&HCCFFD3
MySkin.DownRectColor=&H39B54A
MySkin.OverButColor=&HFFFFFF
MySkin.OverRectColor=&H39B54A
MySkin.LogoURL="http://mysite.com"
MySkin.SetToolbarImage 1, "c:\images\logo.png"
MySkin.SetToolbarImage 7, "c:\images\fitwidth.png"
MySkin.SetToolbarImage 8, "c:\images\fitpage.png"
MySkin.ApplyChanges
Here P2H refers to a Server object instance.