Not sure I understand. Clear() as a function of what? And how do I 
tell it what's to clear? Sorry, if I am missing something obvious.


--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Use clear() to make the rowbackground go away
> 
>  
> 
> ________________________________
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> Behalf Of markgoldin_2000
> Sent: Thursday, July 03, 2008 1:39 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: override updateDisplayList
> 
>  
> 
> I got everything working with row highlighting on demand. Here is 
> mine (mostly yours) code:
> override protected function drawRowBackground(s:Sprite, 
rowIndex:int, 
> y:Number, height:Number, color:uint, dataIndex:int):void
> {
> if (selectedItem != null && rowIndex <= dataProvider.length - 1 && 
> dataProvider[rowIndex].trainplan == true)
> { 
> color = 0xFFFFFF;
> super.drawRowBackground(s,rowIndex,y,height,color,dataIndex);
> }
> }
> 
> override protected function updateDisplayList(unscaledWidth:Number, 
> unscaledHeight:Number):void 
> {
> super.updateDisplayList(unscaledWidth, unscaledHeight);
> var rowBGs:DisplayObject = listContent.getChildByName("rowBGs");
> var colBGs:DisplayObject = listContent.getChildByName("colBGs");
> if (rowBGs != null && colBGs != null) 
> {
> var rowBGIndex:int = listContent.getChildIndex
> (listContent.getChildByName("rowBGs"));
> var colBGIndex:int = listContent.getChildIndex
> (listContent.getChildByName("colBGs"));
> if (colBGIndex > rowBGIndex) 
> { 
> listContent.swapChildrenAt(rowBGIndex, colBGIndex);
> }
> } 
> }
> Using that code I can highlight any row I need.
> Now, the fun part. How can I restore all original colors for 
columns 
> that were thee before row color change?
> 
> Thanks for your help.
>


Reply via email to