> It uses borderColor
I wish it were (and it should be) that simple. Unfortunately,
borderColor only affects the outer 4 sides of the DataGrid.

After a significant amount of digging, I think this is something that
was meant to be implemented but never was. I found the following line
in the setActualSize method of DataGridHeaderSeparator:

g.lineStyle(1, 0x919999); // should be variable set to match
datagrid's border color.

So I think that was meant to be parameterized but got overlooked. I
have created my own headerSeparatorSkin to override this, but as far
as I can tell, I have to hard-code the new color because I don't have
access to getStyle("borderColor"). (Any help on this would be
appreciated as well.)

The same color (0x919999) is hard-coded as the bottom border of the
DataGrid header as well. From DataGrid.drawHeaderBackground():

g.lineStyle(0, 0x919999, 100);
g.lineTo(0, hh - 0.5);

I have created a DataGrid subclass and overridden this method (taking
advantage of getStyle("borderColor")), but am not sure how reliable
the code is because I am not able to calculate the same width
measurements as DataGrid, because it uses some private properties to
do so.

I welcome further insight into this matter, but its unfortunate that
it seems like a small oversight means that we are now required to
create a subclass of the entire DataGrid, just to accomplish some
basic styling. Seems like a small change... maybe you can firecall it
into 2.0.1? :)

Thanks,
Ben


--- In [email protected], "Matt Chotin" <[EMAIL PROTECTED]> wrote:
>
> Alex delivers: It uses borderColor.  You can override
> drawHeaderBackground() if that isn't good enough.
> 
>  
> 
>  
> 
> ________________________________
> 
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of ben.clinkinbeard
> Sent: Thursday, November 16, 2006 8:58 PM
> To: [email protected]
> Subject: [flexcoders] Re: How can I change the color of DataGrid
> header's bottom border?
> 
>  
> 
> Hi Matt,
> 
> Thanks for responding. headerColors just lets you specify the 2 colors
> to use for the gradient- I am trying to set the border on the bottom
> of that gradient. I would think that would be something you could set
> in the style specified by headerStyleName but as I mentioned in my
> initial post, only text related properties seem to have any effect in
> that style. The docs say that headerStyleName defaults to
> dataGridStyles, which I can't seem to find at the moment. I found it
> the other day and am pretty sure it didn't really offer any clues. I
> think it only set one property if memory serves.
> 
> I really hope you or someone else can shed some light on this because
> it really shouldn't be this hard to do this. I'm guessing you've got
> the hookup when it comes to access to people who might know the answer
> :)
> 
> Thanks,
> Ben
> 
> --- In [email protected] <mailto:flexcoders%40yahoogroups.com>
> , "Matt Chotin" <mchotin@> wrote:
> >
> > And if headerColors is the wrong thing just read through the datagrid
> > skins source and see what it's doing :-)
> > 
> > 
> > 
> > ________________________________
> > 
> > From: [email protected] <mailto:flexcoders%40yahoogroups.com>
> [mailto:[email protected] <mailto:flexcoders%40yahoogroups.com>
> ] On
> > Behalf Of ben.clinkinbeard
> > Sent: Thursday, November 16, 2006 1:19 PM
> > To: [email protected] <mailto:flexcoders%40yahoogroups.com> 
> > Subject: [flexcoders] Re: How can I change the color of DataGrid
> > header's bottom border?
> > 
> > 
> > 
> > Is this not possible?
> > 
> > --- In [email protected]
> <mailto:flexcoders%40yahoogroups.com>
> <mailto:flexcoders%40yahoogroups.com>
> > , "ben.clinkinbeard"
> > <ben.clinkinbeard@> wrote:
> > >
> > > Good god skinning is harder than it should be. I have managed to
> > > change the color of the vertical separators between column headers
> by
> > > coding my own headerSeparatorSkin class, but I cannot find where to
> > > change the bottom border. I have created a custom style and assigned
> > > it to headerStyleName, but only text related properties seem to do
> > > anything. background-color: #FF0000; doesn't even do anything.
> > > 
> > > Anyone have any clue how to do this?
> > > 
> > > Thanks,
> > > Ben
> > >
> >
>



Reply via email to