Thanks a million... you got me on the right path.

Actually I had to override the ListBase class's as the List class was
overriding this function.

//----------------------------------------------------
// Override drawHighlightIndicator() function from ListBase
//----------------------------------------------------
/** Import ListBase, IListItemRenderer, Sprite and Graphics classes
 * to override drawHighlightIndicator() function in ListBase
 */
     override protected function drawHighlightIndicator(
                 indicator:Sprite, x:Number, y:Number,
                 width:Number, height:Number, color:uint,
                 itemRenderer:IListItemRenderer):void
     {
          var g:Graphics = Sprite(indicator).graphics;
          g.clear();
          //g.beginFill(color1); //** no fill on rollover highlight
          g.lineStyle(3,color2,1);//add lineStyle to add 3 pt. border
          g.drawRect(0, 01, width, height);
          //g.endFill();
                
          indicator.x = x;
          indicator.y = y;
     }
//----------------------------------------------------


--- In [email protected], "Alex Harui" <[EMAIL PROTECTED]> 
wrote:
>
> If you subclass the List, you can override drawHighlightIndicator 
nad
> drawSelectionIndicator.
> 
>  
> 
> ________________________________
> 
> From: [email protected]
> [mailto:[EMAIL PROTECTED] On Behalf Of Michael
> Sent: Wednesday, February 07, 2007 5:04 AM
> To: [email protected]
> Subject: [flexcomponents] creating a Rectangle around a selected 
List
> item
> 
>  
> 
> Greetings,
> 
> I'm fairly new to Flex 2 and am trying to extend a List component 
so 
> that the selected line (and the roll-over) has a border around it 
> instead of just a solid color. It seems that the focusRect() would 
> work, but I can't seem to understand how to access it.
> 
> Are there any examples out there that could demonstrate something 
like 
> this?
> 
> Thanks,
> 
> M
>


Reply via email to