SetBorder()

Syntax:

SetBorder( Style, Round, Width, Radius, Colour1, Colour2, Opacity )

Parameters:

Style – the name of one of the Border styles you can create with this function. Style must be one of the following keywords: None, Plain, Double, Neon, Ellipse, Mask, Raised or Sunken. This parameter is required. The keyword must be surrounded by quote marks or a variable containing one of the valid keywords.

Round – set if the border should have rounded edges. Round is either true to set rounded corners or false to not set rounded corners. This parameter is optional and the default is false.

Width – set the width of the border in pixels. Width is an integer. This parameter is optional and the default is 0.

Radius – set the corner radius i.e. the amount of pixels by which the corner is rounded. The radius is an integer. This parameter is optional and the default is 0.

Colour1 – the first border colour to be used. Colour1 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 0.

Colour2 – the second border colour to be used. Colour2 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 0.

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

Note:
Different styles use a different amount of colours. For example, Plain only uses one colour, so you only need to enter the Colour1 parameter; Neon requires two colours, so you will need to set values for both Colour1 and Colour2. The RGB value can be calculated using the RGB function.

Remarks:

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

(i)  Specify an object name – in this method, the Border 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 Border style is set for the Object State of the object specified in the GetAppearance function.

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

image\Script_Button.jpgExamples