Why didn’t default renderer do what you want?

On 5/5/10 12:58 PM, "mitchgrrt" <[email protected]> wrote:






I'm trying to use a TextArea as an ItemRenderer for a DataGridColumn.  I
want the rows to be high enough to hold the text, however many lines
there are.  It's not working.  Can somebody offer some advice?  Thanks.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
layout="absolute">
 <mx:Script>
 <![CDATA[
 [Bindable] private var _selectedData:Object = {
 formFactor: "x<br>y<br>z"
 };
 ]]>
 </mx:Script>

<mx:DataGrid dataProvider="{_selectedData}" rowCount="1"
variableRowHeight="true" verticalScrollPolicy="off"
verticalAlign="middle">
 <mx:columns>
 <mx:DataGridColumn headerText="Form Factor" wordWrap="true"
>
 <mx:itemRenderer>
 <mx:Component>
 <mx:TextArea htmlText="{data.formFactor}"
verticalScrollPolicy="off" wordWrap="true" />
 </mx:Component>
 </mx:itemRenderer>
 </mx:DataGridColumn>
 </mx:columns>
 </mx:DataGrid>

</mx:Application>






--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui

Reply via email to