In the end it was a lot simpler than what I was trying (having an item renderer draw the whole sort part) but it was still pretty complicated, in that I had to make 2 very light-weight renderers. I could have just had the sequence number just stay one colour, but decided to get a little fancy and have a mouse over colour and a normal colour.
The header renderer (ubicAdvancedDataGridHeaderRenderer.mxml) is:
<?xml version="1.0" encoding="utf-8"?>
<mx:AdvancedDataGridHeaderRenderer xmlns:mx="http://www.adobe.com/2006/mxml"
color="{ColourGlobals.TEXT_AGAINST_DARK}"
mouseOver="bMouseOver = true" mouseOut="bMouseOver = false">
<mx:Script><![CDATA[
public var bMouseOver:Boolean = false;
]]></mx:Script>
</mx:AdvancedDataGridHeaderRenderer>
then the sort renderer is:
package assets.GridTools {
import mx.controls.advancedDataGridClasses.AdvancedDataGridSortItemRenderer;
public final class ubiAdvancedDataGridSortItemRenderer extends AdvancedDataGridSortItemRenderer {
override protected function commitProperties():void {
super.commitProperties();
const oHeader:ubicAdvancedDataGridHeaderRenderer = owner as ubicAdvancedDataGridHeaderRenderer;
label.textColor = oHeader.bMouseOver ? ColourGlobals.DARK : ColourGlobals.TEXT_AGAINST_DARK;
}
}
}
Don't ask my why I made one Flex and the other AS. It works, so not being broke, I ain't gonna fix it.