I managed to get half way there. This didn't format too well, but it 
basically replaces the selection, and highlight indicator with a box 
with a black border. I think it should be able to use a gradient fill 
and mess with the alpha properties to get the desired effects. Hope 
this helps anyone. This should be placed in a class that extends 
ListBase.
                

override protected function drawSelectionIndicator(indicator:Sprite, 
x:Number, y:Number, width:Number, height:Number, color:uint, 
itemRenderer:IListItemRenderer):void {
                        var w:int = unscaledWidth - viewMetrics.left -
 viewMetrics.right - 3;
                        var g:Graphics = Sprite(indicator).graphics;
                        g.clear();
                        g.beginFill(color);
                        g.lineStyle(1);
                        g.drawRect(1, 1, w, height - 2);
                        g.endFill();
                        indicator.x = x;
                        indicator.y = y;
                        //super.drawSelectionIndicator(indicator, x, 
y, width, height, color, itemRenderer);         
                }
                
                override protected function drawHighlightIndicator(
                                                        
        indicator:Sprite, x:Number, y:Number,
                                                        
        width:Number, height:Number, color:uint,
                                                        
        itemRenderer:IListItemRenderer):void {
                        var w:int = unscaledWidth - viewMetrics.left -
 viewMetrics.right - 3;
                        var g:Graphics = Sprite(indicator).graphics;
                        g.clear();
                        g.beginFill(color);
                        g.lineStyle(1);
                        g.drawRect(1, 1, w, height - 2);
                        g.endFill();
                        indicator.x = x;
                        indicator.y = y;
                }

--- In [email protected], "j301c" <[EMAIL PROTECTED]> wrote:
>
> I recently was looking at the flex application at 
> http://www.mindomo.com/demo
> 
> In particular, if you click the 'open' at the top left corner of 
the 
> screen (an open folder icon), a window comes up with a datagrid.  
The 
> datagrid has a custom gradient selection indicator and rollover 
> indicator.  I have attempted to recreate this by overriding 
> drawSelectionIndicator in my DataGrid... I thought it would be 
> relatively simple to draw a gradient rectangle and replace the 
standard 
> selection indicator. I havn't had any luck. Anyone have an idea how 
> this is done? Thanks.
>


Reply via email to