Category Archives: CSSStyleDeclaration

Styling Alert controls in Flex using the StyleManager class and setStyle() method (Flex 4 Edition)

In a previous example, “Styling Alert controls in Flex using the StyleManager class and setStyle() methods”, we saw how to style a Flex Alert control using the static StyleManager.getStyleDeclaration() method, and the setStyle() method.

The following example shows how you can do the same thing using the beta Flex 4 SDK by passing a fully qualified class name to the static getStyleDeclaration() method.

Continue reading Styling Alert controls in Flex using the StyleManager class and setStyle() method (Flex 4 Edition)

Styling specific states in a Spark ToggleButton control in Flex 4 (redux)

In a previous example, “Styling specific states in a Spark ToggleButton control in Flex 4”, we saw how to style specific states in a Flex 4 Spark ToggleButton control using CSS by specifying the state name after the control name in the <Script> block.

The following example shows how you can set styles on specific states on a Flex 4 Spark ToggleButton control using ActionScript.

Full code after the jump.

Continue reading Styling specific states in a Spark ToggleButton control in Flex 4 (redux)

Building a simple style browser in Flex 3

In my previous post, “Introducing the StyleManager.selectors property in Flex 3“, we looked at the new StyleManager class’s static selectors property introduced in Flex 3.

This example shows how you can make a simple app which lets you loop over styles currently registered with the StyleManager and display their current style names and values.

Full code after the jump.

Continue reading Building a simple style browser in Flex 3