Creating multi-line list rows with variable row heights
The following example shows how you can create multi-line rows with wrapping text and variable row heights with the Flex List control.
<?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.flexexamples.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> |
9:52 AM
|
Labels:
Flex DataGrid Samples,
Flex with List Control
|
This entry was posted on 9:52 AM
and is filed under
Flex DataGrid Samples
,
Flex with List Control
.
You can follow any responses to this entry through
the RSS 2.0 feed.
You can leave a response,
or trackback from your own site.
Subscribe to:
Post Comments (Atom)
1 comments:
Thanks for this post. I had the issue with the List and Text component. Now you solved my problem.
Thanks and Keep it up.
Post a Comment