set column header text color through setting headerStyleName

set column header text color through setting headerStyleName

Postby haretu » Tue Mar 22, 2011 11:44 am

Adobe flex

This example shows how to set column header text color through setting headerStyleName

Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<mx:Application name="DataGrid_headerStyleName_color_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white" viewSourceURL="srcview/index.html">

    <mx:Style>
        .myHeaderStyles {
            color: red;
            fontWeight: bold;
        }
    </mx:Style>

    <mx:Array id="arrDP">
        <mx:Object c="1" c1="One" c2="Two" c3="Three" />
        <mx:Object c="2" c1="One" c2="Two" c3="Three" />
        <mx:Object c="3" c1="One" c2="Two" c3="Three" />
        <mx:Object c="4" c1="One" c2="Two" c3="Three" />
        <mx:Object c="5" c1="One" c2="Two" c3="Three" />
        <mx:Object c="6" c1="One" c2="Two" c3="Three" />
        <mx:Object c="7" c1="One" c2="Two" c3="Three" />
        <mx:Object c="8" c1="One" c2="Two" c3="Three" />
        <mx:Object c="9" c1="One" c2="Two" c3="Three" />
        <mx:Object c="10" c1="One" c2="Two" c3="Three" />
        <mx:Object c="11" c1="One" c2="Two" c3="Three" />
    </mx:Array>

    <mx:DataGrid id="dataGrid"
            dataProvider="{arrDP}"
            headerStyleName="myHeaderStyles" />

</mx:Application>
Attachments
67_1.JPG
67_1.JPG (15.73 KiB) Viewed 740 times
haretu
 
Posts: 132
Joined: Sat Jan 08, 2011 9:56 pm

Return to Adobe FLEX Flash

Who is online

Users browsing this forum: No registered users and 1 guest

cron