读书人

flex有关问题

发布时间: 2012-02-05 12:07:15 作者: rapoo

flex问题
RichTextEditor如何设置背景色,,还有我发现很多组件有BackGroundColor这个属性但是都不能设置背景色,,高手指点一下下。这里面的原理是什么。。谢谢。。

[解决办法]
你是想让中间的显示区域有背景色吗?

XML code
<?xml version="1.0" encoding="utf-8"?><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"                        layout="absolute">    <mx:Script>        <![CDATA[            private function textEditorCreated():void            {                textEditor.textArea.setStyle("backgroundColor","red");            }                    ]]>    </mx:Script>    <mx:VBox>        <mx:RichTextEditor id="textEditor" creationComplete="textEditorCreated()">                    </mx:RichTextEditor>    </mx:VBox></mx:Application> 

读书人网 >flex

热点推荐