SetBtnColour()

Syntax:

SetBtnColour( SurfaceColour, LightBevelColour, DarkBevelColour, BevelWidth, BevelOpacity, BlackOutline )

Parameters:

SurfaceColour – the colour of the surface of the button. SurfaceColour must be a positive integer indicating a valid RGB value or a variable containing a valid RGB value. This parameter is optional and the default is RGB(192,192,192) (i.e. grey or string colour "c0c0c0").

LightBevelColour – the light bevel colour of the button. LightBevelColour must be a positive integer indicating a valid RGB value or a variable containing a valid RGB value. This parameter is optional and the default is RGB(255,255,255) (i.e. white or string colour "ffffff").

DarkBevelColour – the dark bevel colour of the button. DarkBevelColour must be a positive integer indicating a valid RGB value or a variable containing a valid RGB value. This parameter is optional and the default is RGB(0,0,0) (i.e. black or string colour "000000").

BevelWidth – set the bevel width of the button in pixels. BevelWidth is an integer. This parameter is optional and the default is 4.

BevelOpacity – a percentage, showing the level of opacity for the border. BevelOpacity must be an integer between 0 and 100. This parameter is optional and the default is 75.

BlackOutline – an outline border of black around the button. BlackOutline is either true if you want a black outline or false if you do not. This paramter is optional and the default is true.

Note:
The RGB value can be calculated using the RGB function.

Remarks:

This function allows you to create the Button style for a specified Button object. There are two methods of using this function:

(i)  Specify an object name – in this method, the Button style will be set on the Normal (i.e. default) Object State.

(ii) Specify a new object created with the GetAppearance function – in this method, the Button style is set for the Object State of the object specified in the GetAppearance function.

Note:
The Button style can be removed using the RemoveBtnColour function or in the Button tab of the object’s Properties dialog.

image\Script_Button.jpgExamples