There are too many tutorials teaching us how to change textArea styles in Flex 4 with Spark theme styles. It is unlucky for people like me who are still working on legacy Flex 3 project. It cost me several hours to change the textarea component styles in Flex 3. In my project, I want to change the Flex TextArea vertical scrollbar truck style, drag thumb style, and hide the scroll arrow. First, I create the scrollbar truck skin and thumb skin in flash and publish as swc file, then change the Textarea vertical scrollbar style by following code:

.vScrollBarSkin
{
	trackSkin: Embed(skinClass='VScrollBar_trackSkin');
	thumbSkin: Embed(skinClass='VScrollBar_thumbSkin');
	downArrowSkin: ClassReference(null);
	upArrowSkin: ClassReference(null);
}

In the mxml file, we need to apply the above style css to verticalScrollBarStyleName attribute:

    <mx:TextArea width="579" height="200" y="12" x="13" verticalScrollBarStyleName="vScrollBarSkin"/>
Previous PostNext Post

2 Comments

  1. Hi, thanks for the tip, but still am not sure how u call these two lines without reference of the swc.
    trackSkin: Embed(skinClass=’VScrollBar_trackSkin’);

    thumbSkin: Embed(skinClass=’VScrollBar_thumbSkin’);

    Please explain…

  2. Hi, Ajeeth:

    You are right. I am using flash to create the swc skin file. VScrollBar_trackSkin and VScrollBar_thumbSkin are the class name of the Movieclip Class.

Leave a Reply

Your email address will not be published. Required fields are marked *