User Guide

UIObject.getStyle() 1369
Example
The following code redraws the object form2 when the form object is drawn:
formListener.draw = function(eventObj:Object) {
form2.redraw(true);
}
form.addEventListener("draw", formListener);
See also
EventDispatcher.addEventListener()
UIObject.getStyle()
Availability
Flash Player 6 (6.0.79.0).
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 style declaration or object. If the style property is an
inheriting style, the ancestors of the object may be the source of the style value.
For a list of the styles supported by each component, see the individual component entries.
See also “Using global, custom, and class styles in the same document” in Using Components.
Example
The following code sets the ib instances fontWeight style property to bold if the cb
instances
fontWeight style property is bold:
if (cb.getStyle("fontWeight") == "bold") {
ib.setStyle("fontWeight", "bold");
};