I was able to get the *header* to be transparent doing the following, but the color of the ListBaseContentHolder shows through and is not transparent.  If you set backgroundAlpha=”0” on the datagrid, then it will be completely transparent, but then you also lose any row background colors that you may have had, but highlight colors still work.

 

MXML Markup:

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:local="*" layout="absolute">

           

            <mx:Style>

                        DataGrid {

                                    backgroundAlpha:0;

                        }          

            </mx:Style>

           

            <local:MyDataGrid x="10" y="10" dataProvider="{[1,2,3,4,5]}" >

                        <local:columns>

                                    <mx:DataGridColumn headerText="Column 1" dataField="col1"/>

                                    <mx:DataGridColumn headerText="Column 2" dataField="col2"/>

                                    <mx:DataGridColumn headerText="Column 3" dataField="col3"/>

                        </local:columns>

            </local:MyDataGrid>

           

</mx:Application>

 

MyDataGrid Class:

package

{

            import mx.controls.DataGrid;

            import mx.core.UIComponent;

 

            public class MyDataGrid extends DataGrid

            {

                        override protected function drawHeaderBackground( headerBG : UIComponent ) : void

                        {

                                    headerBG.alpha = 0;

                        }

            }

}

 

_____________________________________

Andrew Trice

Cynergy Systems, Inc.

http://www.cynergysystems.com

 

Blog: http://www.cynergysystems.com/blogs/page/andrewtrice

Email: [EMAIL PROTECTED]

Office: 866-CYNERGY 

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of hank williams
Sent: Wednesday, October 18, 2006 2:50 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Making the datagrid header background alpha 0

 

Jim,

Thanks, buy yeah I've tried that and it doesnt work. I can set the
font, but not the backgroundAlpha.

Hank

On 10/18/06, Jim Robson <[EMAIL PROTECTED]t.com> wrote:
> Hank,
>
> Did you try using headerStyleName?
>
> Something like this:
>
> DataGrid {
> headerStyleName: myHeaderStyle;
> }
> .myHeaderStyle{
> backgroundAlpha: 0.0;
> }
>
> -Jim
>
> --- In [EMAIL PROTECTED]ups.com, "hank williams" <[EMAIL PROTECTED]> wrote:
> >
> > I want to make my datagrid header transparent the way the body is, but
> > there is no field for header alpha as far as I can see. I am sure I
> > could make some kind of skin, but I havent much looked into skinning
> > the datagrid and was wondering if there was some fairly easy way to
> > acheive the effect I am looking for.
> >
> > Hank
> >
>
>
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
>
>
>
>
>

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to