发新话题
打印

[求救] 如何更改组件TextArea中的文字颜色

如何更改组件TextArea中的文字颜色

我想请教下组件TextArea中的文字颜色更改,要怎么写啊??谢谢!!

TOP

为什么文字没有变白色呢?

aboutarea.setStyle("backgroundColor","0x993300");
aboutarea.setStyle("textColor", "#ffffff");
System.useCodepage = true;
this.createTextField("area_about", 10, 10, 10, 480, 600);
var about_xml:XML = new XML();
about_xml.ignoreWhite = true;
about_xml.onLoad = function (success:Boolean):Void {
    if (success) {
        var childItems:Array = about_xml.firstChild.firstChild.firstChild.childNodes;
        for (var i:Number = 0; i < 2; i++) {
                        //if(i<2)
            area_about.text += childItems.firstChild.nodeValue;
        }
    } else {
        area_about.text = "Unable to load external file.";
    }
}
about_xml.load("about.xml");

TOP

你是不是应该把颜色代码 #ffffff  改成  0xffffff

TOP

发新话题