Tag Archives: baseColor

Styling specific states in a Spark ToggleButton control in Flex 4

The following example shows how you can 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. In this example the base color for all the states is set to red and then overridden in the “upAndSelected”, “overAndSelected”, “downAndSelected”, and “disabledAndSelected” states and set to haloGreen.

And a huge thanks to my co-worker, Joan “Tan” Lafferty for explaining Advanced CSS to me! And for more information on Advanced CSS tricks, check out the “CSS Advanced Selectors – Functional and Design Specification” on the Flex 4 page at the opensource.adobe.com website.

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