Figured the problem out enough.
-Even though I had autoDrawbackground set to false, I DID NOT include
all the states I wanted the renderer to show.
-Also since I'm using scripted Drawing API instead of MXML tags to draw
my graphics I was able to include my script inside the
overridden "stateChanged" method.
<s:ItemRenderer autoDrawBackground="false">
<s:states>
<s:State name="selected" />
<s:State name="normal" />
</s:states>
<s:BorderContainer id="_con">
<fx:Script>
<![CDATA[
override protected function stateChanged(oldState:String,
newState:String, recursive:Boolean):void
{
super.stateChanged(oldState,newState,recursive);
customGraphics(); //Write curstom graphics here using
drawing API
}
]]>
</s:BorderContainer>
</s:ItemRenderer>
On 5/15/2012 3:34 PM, Keith wrote:
For an "MX" List I could override the protected "drawSelectionIndicator"
method in a List itemRenderer.
For a "Spark" List, I have no idea how to do this, since there is no
"drawSelectionIndicator" method
My goal is to draw my own graphics for the selection indication.
I tried overriding the "updateDisplayList" method to draw my graphics
but cannot get rid of the default selection indicator graphics.
I also tried setting the<s:ItemRenderer> "autoDrawBackground" to
false, it prevents selection indication but ALSO prevents my custom
graphics from showing as well.
--
Keith H
htttp://keith-hair.net
--
Keith H http://keith-hair.net