User Guide
Window component 893
Window.titleStyleDeclaration
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX 2004.
Usage
windowInstance.titleStyleDeclaration
Description
Property; a string indicating the style declaration that formats the title bar of a window. The
default value is
undefined, which indicates bold, white text.
Example
With a Window component in the library, use the following ActionScript to format the style of
the window’s title bar.
// create a new CSSStyleDeclaration named TitleStyles
// and list it with the global styles list
_global.styles.TitleStyles = new mx.styles.CSSStyleDeclaration();
// customize styles
_global.styles.TitleStyles.fontStyle = "italic";
_global.styles.TitleStyles.textDecoration = "underline";
_global.styles.TitleStyles.color = 0xff0000;
_global.styles.TitleStyles.fontSize = 14;
tw = mx.managers.PopUpManager.createPopUp(this, mx.containers.Window, true,
{closeButton:true, titleStyleDeclaration:"TitleStyles"});
tw.title = "Testing Styles";
tw.setSize(200, 100);
tw.move(20, 20);
var handleCloseObject:Object = new Object();
handleCloseObject.click = function(evt:Object) {
evt.target.deletePopUp();
};
tw.addEventListener("click", handleCloseObject);
For more information about styles, see “Using styles to customize component color and text”
on page 67.