Arghgh...sorry folks - posted my question before finishing it...

My question is:  How can I change the backgroundColor of a TextArea
that is used within an itemRenderer when the MouseOver event fires?

I have the following code:


<mx:List id="lstPeople" dataProvider="{people.person}" 
           width="250" height="160" >
    <mx:itemRenderer >
        <mx:Component>
           <mx:Canvas width="240" height="75">                        
                <mx:Label left="50" top="3" text="{data.Name}"/>
                <mx:TextArea id="taAddress" left="50" top="21"
                     text="{data.Address}" editable="false" 
                     borderStyle="none"   />            
                <mx:Image source="assets/person.png" left="10" top="3"/>
           </mx:Canvas>         
       </mx:Component>                  
   </mx:itemRenderer>   
</mx:List>

When the user hovers the mouse over the List, the default behaviour is
to highlight the background color of each cell in the List.  Since I
am using a TextArea, the background of this particular control stays
white and stands out.

The TextArea component has a backgroundColor property and a MouseOver
event, so I figured that I could call an function from within the
MouseOver event to set the TextArea's background color.

I have been unsuccessful - I can't get a reference to the textArea,
even though it has an ID, and if I try to call the function inline
from the mouseOver event in the TextArea's mxml, I get a compiler area.

Thanks.


Reply via email to