+ -
当前位置:首页 → 问答吧 → htmlText不支持autoSize属性吗?怎么才能得到高度?

htmlText不支持autoSize属性吗?怎么才能得到高度?

时间:2010-12-24

来源:互联网

test.rar (12.45 KB)
test.rar (12.45 KB)
下载次数: 3
2010-12-24 16:31

RT了,加了autoSize后用htmlText就读不出数据了,而用text又可以,但不支持标签。

现就是想能支持标签,同时可以得到文本的高度,因为有滚动条。

stop();
mytextarea = this.main_mc.ta.tb.scrollContent.con;

var newsXML:XML = new XML();
newsXML.ignoreWhite = true;
newsXML.onLoad = function(success) {
       if (success) {
              parseXML();
       }
};
newsXML.load("xml/g01.xml");
function parseXML() {
       mytextarea.wordWrap = true;
       mytextarea.editable = false;
       mytextarea.html = true;
       mytextarea.autoSize = true;
       //mytextarea.text = newsXML.firstChild.firstChild.nodeValue;
       mytextarea.htmlText = newsXML.firstChild.firstChild.nodeValue;
       _global.textHeight = mytextarea._height;
       this.main_mc.ta.tb.scrollText();
       trace(_global.textHeight )
}

[ 本帖最后由 Jeken 于 2010-12-24 16:31 编辑 ]

作者: Jeken   发布时间: 2010-12-24

   autoSize +htmlText  我一直这么用,没有问题的

autoSize="left";

作者: flash023   发布时间: 2010-12-24

能不能帮忙看下,或者给个现成的这功能的。

找了半天也没有搞定。

谢谢了!

作者: Jeken   发布时间: 2010-12-24

引用:
flash023 发表于 2010-12-24 16:14
autoSize="left";

附件

T.rar (6.71 KB)

2010-12-24 16:40, 下载次数: 2

作者: flash023   发布时间: 2010-12-24