Q:

List displaying multiple lines Adobe Flex/Actionscript

Im currently creating a list in Adobe Flex/Actionscript for a person search app. At the moment, the list shows 1 line of text:
    <fx:Script>
    <![CDATA[
        import model.PersonSummary;
        import mx.collections.ArrayCollection;
        import spark.events.IndexChangeEvent;

        [Bindable]
        public var listOfPeople:ArrayCollection;  

        public function populate():void{

            listOfPeople = new ArrayCollection(String(data).split("\n"));
        }

    ]]>
</fx:Script>
<fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:List width="100%" id="results" dataProvider="{listOfPeople}" change="clickPerson(event)">
</s:List>

So listOfPeople is just a list of strings... Ive tried adding "\n" to each of these strings to effectively add lines and more detail but anything after the "\n" doesn't show on screen, any ideas?
Thanks
Phil
For example:

Person1
Age
Sex

Person2
Age
Sex

etc

A:

I would use an item renderer. Check out Adobe's docs to get started.
Example item renderer:
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
    borderStyle="none" backgroundColor="white" >

    <mx:Label text="{data.name}"/>
    <mx:Label text="{data.age}"/>
    <mx:Label text="{data.sex}"/>

</mx:VBox>

