UIObject.setStyle()

Availability

Flash Player 6.0.79.

Edition

Flash MX 2004.

Usage

componentInstance.setStyle(propertyName, value)

Parameters

propertyName A string indicating the name of the style property (for example, "fontWeight", "borderStyle", and so on).

value The value of the property.

Returns

A UIObject that is an instance of the specified class.

Description

Method; sets the style property on the style declaration or object. If the style property is an inheriting style, the children of the object are notified of the new value.

For a list of the styles supported by each component, see their individual entries.

Example

The following code sets the fontWeight style property of the check box instance cb to bold:

cb.setStyle("fontWeight", "bold");