Holy Smokes Douglas, I got it to work!  You are awesome, thanks for showing
me the way!! So ItemRenderer does not expose drawBackground directly the way
that LabelItemRenderer does, but I watched a very valuable video on how to
dig deep into Flex Source Code that helped me search for what I needed. 
That video is here:

http://tv.adobe.com/watch/360flex-conference/reading-the-flex-source-code-by-jonathan-branam/

What I found after searching is that I could override an mx_internal
function called drawBackground, which you MUST be sure to include this
namespace or you will get a 1004 error.

public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal";;

So, basically, I just create an overlay rectangle in my ItemRenderer with
the visibility set to false.  I then override the drawBackground function to
test the "selected" Boolean, and if the renderer is selected, I change the
overlay visibility to true.  So it breaks down like this:

<fx:Script>
                
</fx:Script>

<s:Rect id="overlayRect" x="0" y="0" alpha=".3" visible="false">
        <s:fill>
                <s:SolidColor color="#A30000"/>
        </s:fill>
</s:Rect>



--
View this message in context: 
http://apache-flex-users.2333346.n4.nabble.com/ItemRenderer-What-event-to-react-to-tp15157p15194.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Reply via email to