Styling the decrement button and increment button on a Spark VScrollBar control in Flex 4

The following example shows how you can use advanced CSS to style the decrement and decrement buttons on a Spark TextArea control’s vertical scroll bar in Flex 4 by styling the #decrementButton and #incrementButton selectors.

Full code after the jump.

To use the following code, you must have Flash Player 10 and a Flex 4 SDK installed in your Flex Builder 3. For more information on downloading and installing the Flex 4 SDK into Flex Builder 3, see “Using the beta 4 SDK in Flex Builder 3”.


<?xml version="1.0" encoding="utf-8"?>
<!-- -->
<s:Application name="Spark_TextArea_VScrollBar_decrementButton_test"

        @namespace s "library://";

        s|TextArea s|VScrollBar #decrementButton {
            baseColor: #FF0000;

        s|TextArea s|VScrollBar #incrementButton {
            baseColor: haloGreen;

    <s:TextArea id="textArea"
            text="The quick brown fox jumps over the lazy dog."
            verticalCenter="0" />


View source is enabled in the following example.

This entry is based on a beta version of the Flex Gumbo SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex Gumbo SDK.