## filePath

Some methods allow to set images as background images or as images for each event.

The filePath of an image can be set in 2 different ways:

### 1 parameter

filePathAndName: String. The full path and name of the file to be included.

style.setImage(filePathAndName)

The path for the images is relative to dFrameFilePath. It starts from the 'first' dFrame directory (the one which contains another dFrame directory) and doesn't begin with a '/' as the dFrameFilePath ends with one.

The full path used for the image will be dFrameFilePath + filePathAndName.

For more information: See dFrameFilePath in the reference documentation

Example:

buttonStyleYellow.setImageNormal('dFrame/doc/reference/examples/include/yellow.gif')

If dFrameFilePath has been set to '/rootDirOfServer/dFrame/' the complete path for the image will be '/rootDirOfServer/dFrame/dFrame/doc/reference/examples/include/yellow.gif'

### 2 parameters

filePathAndName: String. The full path and name of the file to be included.

'A' keyword: To be set as it.

style.setImageX(filePathAndName, 'A')

Example

buttonStyleRed.setImageNormal('./include/red.gif', 'A')

buttonStyleGreen.setImageNormal(_

'../../../../../dFrame/dFrame/doc/reference/examples/include/green.gif', 'A')

In this case the full filePathAndName is used as it.

var barStyleRed = new BarStyle(barStyle)

barStyleRed.setBgImage('./filePath/red.gif', 'A')

var barStyleYellow = new BarStyle(barStyle)

barStyleYellow.setBgImage('dFrame/doc/StylesDocumentation/examples/filePath/yellow.gif')

Those 2 different ways indicate the same directory.

Demo

file: styleColors.js, buttonStyle.setImageNormal et buttonStyle.setImageRoll

See the source code