It is a bug in how styles are hooked up for header renderers.

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Daniel Gold
Sent: Tuesday, July 15, 2008 2:53 PM
To: [email protected]
Subject: Re: [flexcoders] DataGrid Header Styles

 

> That seems like over kill for such a simple thign

Welcome to Flex!

I can never get the textRollOverColor to work on the header. Here's a
stab at a simple renderer that just grabs the textRollOverColor style
from the DataGrid

<?xml version="1.0" encoding="utf-8"?>
<mx:Label text="{_listData.label}"
xmlns:mx="http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> " width="100%" height="100%"
implements="mx.controls.listClasses.IDropInListItemRenderer"
    mouseOver="onMouseOver()" mouseOut="onMouseOut()">    

    <mx:Script>
        <![CDATA[
            import mx.controls.DataGrid;
            
            import mx.controls.listClasses.BaseListData;
            import mx.controls.List;
            
            [Bindable] private var _listData:BaseListData;
            
            override public function get listData():BaseListData
            {
                return _listData;
            }

            override public function set
listData(value:BaseListData):void
            {
                _listData = value;
            }
                        
            private function onMouseOver():void
            {
 
setStyle("color",DataGrid(_listData.owner).getStyle("textRollOverColor")
);
            }
            
            private function onMouseOut():void
            {
 
setStyle("color",DataGrid(_listData.owner).getStyle("color"));

            }            

        ]]>
    </mx:Script>
        
</mx:Label>

On Tue, Jul 15, 2008 at 1:27 PM, Dan Vega <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote:

Just to change text styles? That seems like over kill for such simple
thing

Dan





On Tue, Jul 15, 2008 at 2:04 PM, Alex Harui <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote:

You may need to create custom header renderers.

 

________________________________

From: [email protected] <mailto:[email protected]>
[mailto:[email protected] <mailto:[email protected]> ]
On Behalf Of Dan Vega
Sent: Tuesday, July 15, 2008 8:40 AM
To: [email protected] <mailto:[email protected]> 
Subject: [flexcoders] DataGrid Header Styles

 

I have some custom styles for my datagrid that apply to all datagrids.
My problem is that the rows of the grid get a rollover color close to
black and the text is white. The problem is with the header. When I roll
over the header the background color is black but so is the text so I
can not tell what the text says. Also the arrows are black so you never
see those. Is there a way to customize all of this or just tell the
header to act normal (don't apply styles)? 

DataGrid {
    textRollOverColor:#ffffff; 
    rollOverColor:#242424;
    selectionColor:#242424;
    textSelectedColor:#ffffff;
    headerStyleName: dataGridHeader;
}
.dataGridHeader {
    textRollOverColor:#FFFFFF;
}


Thank You
Dan Vega
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
http://www.danvega.org <http://www.danvega.org>  

 

 

 

Reply via email to