Skip to content

Instantly share code, notes, and snippets.

@rjattrill
Created July 5, 2012 00:01
Show Gist options
  • Save rjattrill/3050165 to your computer and use it in GitHub Desktop.
Save rjattrill/3050165 to your computer and use it in GitHub Desktop.
Word Wrap in Spark DataGrid Header
<?xml version="1.0"?>
<s:Group
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
width="200" height="100"
>
<s:DataGrid id="dataGrid" width="100%" height="100%" minHeight="100" variableRowHeight="true"
>
<s:columns>
<s:ArrayList>
<s:GridColumn dataField="ITEM_1" headerText="Short" width="60"></s:GridColumn>
<s:GridColumn dataField="ITEM 2" headerText="Long Text tttttttttttttttttttttttttttttttttttttt">
<s:headerRenderer>
<fx:Component>
<s:DefaultGridHeaderRenderer maxDisplayedLines="2"/>
</fx:Component>
</s:headerRenderer>
</s:GridColumn>
</s:ArrayList>
</s:columns>
</s:DataGrid>
</s:Group>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment