This content has been marked as final. Show 4 replies
You'll need to create your own CellRenderer. Look at the CellRenderer API in
the Components Language Reference
I'm sorry. I'm having a helluva time trying to find what I need for this. All the documentation just refers to text formatting. Here is the html being imported from the xml file:
This will need some tweaking -- too much flickering -- but it's a start.
First download the multiline cell render sample:
Add a List component to the library and delete the DataGrid.
Open MultiLineCell.as and modify the setValue method:
public function setValue(suggestedValue:String, item:Object,
/* If item is undefined, nothing should be rendered in the cell,
so set the label as invisible. Note: For scrolling List type components
like a scrolling datagrid, the cells are intended to be empty as they
just out of sight, and then the cell is reused again and set to a new
producing an animated effect of scrolling. For this reason, you cannot
any one cell always having data to show or the same value.*/
multiLineLabel.text._visible = false;
multiLineLabel.htmlText = suggestedValue;
Replace the code in frame 1 with this:
var myHtml = "<img src='thumbs/clip01.jpg' hspace='0'
myHtml += "<span class='videoTitle'>Clip 1</span><br/> ";
myHtml += "<span class='videoDescription'>Traveling in
myHtml += "<span class='videoDescription'>Duration: 0:56</span>";
this.createClassObject(mx.controls.List, "myList", 1);
myList.rowHeight = 60; // Allows for 4 lines of text at default text size.
myList.vScrollPolicy = "auto";
myList.cellRenderer = "MultiLineCell";