@invertedSpear, thanks for your hint.
It really works! I mean, subclasses, not SDK editing, have not tried this. But you can subclass for List, DataGrid, etc. (Or even AdvancedDataGrid) and add the following function:
override protected function drawHighlightIndicator(indicator:Sprite, x:Number, y:Number, width:Number, height:Number, color:uint, itemRenderer:IListItemRenderer):void { // get style -- is this the right place? var alpha:Number = this.getStyle("rollOverAlpha"); if (isNaN(alpha)) alpha = 1.0; // no need to draw if alpha 0 if (alpha <= 0) return; // draw -- this has been copied from superclass, and the alpha parameter added to beginFill() var g:Graphics = Sprite(indicator).graphics; g.clear(); g.beginFill(color, alpha); g.drawRect(0, 0, width, height); g.endFill(); indicator.x = x; indicator.y = y; }
Now, if you add a style declaration to the class, you are ready to go:
[Style(name="rollOverAlpha", type="Number", inherit="no")] public class DataGridExt extends DataGrid { ... }
Changing this in the SDK would, of course, be the best choice, since you would only need to touch on two classes: ListBase and AdvancedListBase. I will check for a problem with Adobe Jira.
source share