UIObject.getStyle()

Availability

Flash Player 6.0.79.

Edition

Flash MX 2004.

Usage

componentInstance.getStyle(propertyName)

Parameters

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

Returns

The value of the style property. The value can be of any data type.

Description

Method; gets the style property from the styleDeclaration or object. If the style property is an inheriting style, the parents of the object may be the source of the style value.

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

Example

The following code sets the ib instance's fontWeight style property to bold if the cb instance's fontWeight style property is bold:

if (cb.getStyle("fontWeight") == "bold")
{
   ib.setStyle("fontWeight", "bold");
};