Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
joshuadsilva #1
Wrap Header text in Datagrid (Flex 1.5)
How do I wrap header text in a datagrid in Flex 1.5??
joshuadsilva Guest
-
Text wrap adding a ghost Wrap???
hello, I was working on creating a clipping mask on a photo by using the pen tool and making a silo. Then I would cut the picture and paste into... -
Datagrid Header Disappearing Text
When my stand alone flash app is being resized, the two datagrids' header texts disappears and reappears. I've changed fonts, embedded fonts,... -
Different header and text alignment in winform datagrid ??
How can I have following ? Different header and text alignment in winform datagrid I want to show column center aligned and text right... -
Datagrid wrappable column header text
I may be missing something here, but could someone elaborate for me... Does the datagrid control provide the ability to wrap the column header... -
Datagrid not diplaying header text
I am trying have a datgrid which always displays the column header text, even though the datareader to which it is bound is empty. I have a... -
ymiles #2
Re: Wrap Header text in Datagrid (Flex 1.5)
The only method I've come up with so far is calling a function you create to do
the work with the headerText attribute. See below
Function:
var tabLabel = "";
function wrap() {
tabLabel = "Account"+chr(13)+"Location";
return tabLabel;
}
Call:
<mx:DataGridColumn headerText="{wrap()}" columnName="accountLocation"
editable="false" width="55" />
ymiles Guest
-
ntsiii #3
Re: Wrap Header text in Datagrid (Flex 1.5)
You can insert a break in an mxml tag property using {newline}
Here is an example:
Tracy
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"
initialize="initUI()">
<mx:Script><![CDATA[
private var gaData:Array;
function initUI():Void
{
gaData = new Array();
gaData[0] = new Object({label:"Red", data:"#FF0000"});
gaData[1] = new Object({label:"Green", data:"#00FF00"});
gaData[2] = new Object({label:"Blue", data:"#0000FF"});
}
]]></mx:Script>
<mx:TextArea id="taWrap" text="one{newline}two{newline}three" height="100"
width="300"/>
<mx:DataGrid id="datagrid1" dataProvider="{gaData}" headerHeight="30">
<mx:columns>
<mx:Array>
<mx:DataGridColumn headerText="Column{newline}1" columnName="label" />
<mx:DataGridColumn headerText="Column 2" columnName="data" />
</mx:Array>
</mx:columns>
</mx:DataGrid>
<mx:Button label="Button" click="System.setClipboard(taWrap.text)"/>
</mx:Application>
ntsiii Guest



Reply With Quote

