Dreamweaver.setdivbackgroundcolors() – Adobe Dreamweaver API Reference CS5 User Manual
Page 403

398
DREAMWEAVER API REFERENCE
Design
Last updated 8/27/2013
Arguments
forWhat, color, width, {style}
•
The forWhat argument, which is required, is a string that specifies for what the specified color and width are used.
Possible values are
"divs"
,
"selectedDiv"
, or
"layers"
. If the value is
"layers"
, the specified color and width
are used to outline all layers when the Layout Block Outlines visual aid is on. If the value is
"divs"
, the color and
width arguments are used to outline all divs and other layout blocks. If the value is
"selectedDiv"
, the color and
width arguments are used to outline any div or layout block that is selected.
•
The color argument, which is required, is a string that contains the hexadecimal value that indicates the RGB color
in the form #RRGGBB.
•
The width argument, which is required, is an integer that indicates the outline width, in pixels.
•
The style argument, which is optional, is a string that indicates the style of the outline. Possible values are
"SOLID"
,
"DOTTED"
,
"DASHED"
, and
"OUTSET"
. The
"OUTSET"
value is applicable to layers only. This argument is ignored
when the forWhat argument’s value is
"selectedDiv"
.
Returns
Nothing.
Example
See “
dreamweaver.getBlockVisOutlineProperties()
dreamweaver.setDivBackgroundColors()
Availability
Dreamweaver 8.
Description
This function sets the colors used by the Layout Block Backgrounds visual aid.
Arguments
colors
•
The colors argument, which is required, is an array of strings that contains all the colors, represented as hexadecimal
values in the form #RRGGBB. The array must contain 16 colors.
Returns
Nothing.
Example
The following example makes sure there are no more than 16 colors specified as div background colors and, if so, sets
the colors used as background colors to shades of gray: