Dreamweaver.getselectedstyleisdisabled(), Dreamweaver.setselectedstyleisdisabled() – Adobe Dreamweaver API Reference CS5 User Manual

Page 404

Advertising
background image

399

DREAMWEAVER API REFERENCE

Design

Last updated 8/27/2013

var currentDOM = dw.getDocumentDOM();

var divColors = currentDOM.getDivBackgroundColors("divs");
var shadesOfGray = new Array["#000000", "#111111", "#222222", "#333333",¬

"#444444", "#555555", "#666666", "#777777", "#888888", "#999999", ¬
"#AAAAAA", "#BBBBBB", "#CCCCCC", "#DDDDDD", "#EEEEEE", "#FFFFFF"]¬

var howManyColors = divColors.length;
if howManyColors <= 16{

for (var i = 0; i < howManyColors; i++)

{

currentDOM.setDivBackgroundColors("divs", shadeOfGray[i]);

}

dreamweaver.getSelectedStyleIsDisabled()

Availability
Dreamweaver CS5.

Description
This function gets the state of the selected style whether or not the selected CSS declaration is disabled.

The Disable/Enable CSS Property feature lets you comment out portions of CSS from the CSS Styles panel, without
having to make changes directly in the code. When you comment out portions of the CSS, you can see what kinds of
effects particular properties and values have on your page. When you disable a CSS property, Dreamweaver adds CSS
comment tags and a

[disabled]

label to the CSS property you’ve disabled.

For more information, see Disable/Enable CSS.

Arguments
None.

Returns
A Boolean:

true

if the selected style is disabled.

dreamweaver.setSelectedStyleIsDisabled()

Availability
Dreamweaver CS5.

Description
This function sets the state of the selected style.

Arguments
A Boolean value to enable or disable the selected style. Specify

true

to disable the selected style.

Returns
None.

Advertising