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. Blog: http://www.cynergysystems.com/blogs/page/andrewtrice Email: [EMAIL PROTECTED] Office: 866-CYNERGY From: Jim, -- 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
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 __,_._,___ |
- RE: [flexcoders] Re: Making the datagrid header background a... Andrew Trice