您的位置:首页 > 其它

Flex中如何创建复数行文本内容的List

2008-11-12 11:21 218 查看
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
backgroundColor="white"
creationComplete="init();">

<mx:Script>
<![CDATA[
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;

private function init():void {
commentsXML.send();
}

private function commentsXML_result(evt:ResultEvent):void {
var resultXML:XML = evt.currentTarget.lastResult;
list.dataProvider = resultXML.channel.item;
}

private function commentsXML_fault(evt:FaultEvent):void {
mx.controls.Alert.show("Unable to load XML:n" + commentsXML.url, "ERROR");
}
]]>
</mx:Script>

<mx:HTTPService id="commentsXML"
url="http://blog.minidx.com/comments/feed/"
resultFormat="e4x"
showBusyCursor="true"
result="commentsXML_result(event);"
fault="commentsXML_fault(event);" />

<mx:List id="list"
variableRowHeight="true"
wordWrap="true"
labelField="title"
width="250" />

</mx:Application>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐