Setting the sort icon color on the DataGrid control in Flex

Setting the sort icon color on the DataGrid control in Flex

Postby haretu » Sun Mar 20, 2011 7:20 pm

The following example shows how you can set the icon color (the sort arrow color in the DataGrid header and arrows icons in the horizontal/vertical scrollbar) on a Flex DataGrid control by setting the iconColor style.
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2009/07/21/setting-the-icon-color-on-the-datagrid-control-in-flex/ -->
<mx:Application name="DataGrid_iconColor_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white">

    <mx:ApplicationControlBar dock="true">
        <mx:Form styleName="plain">
            <mx:FormItem label="iconColor:">
                <mx:ColorPicker id="colorPicker"
                        selectedColor="black" />
            </mx:FormItem>
        </mx:Form>
    </mx:ApplicationControlBar>

    <mx:DataGrid id="dataGrid"
            dataProvider="{Font.enumerateFonts(true)}"
            iconColor="{colorPicker.selectedColor}" />

</mx:Application>
Attachments
swf.jpg
swf.jpg (39.35 KiB) Viewed 741 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