I am making use of a custom cursor on itemRenderers in a List component. The custom cursor works just fine except when I mouse over the Text component which is a child of the itemRenderer at which point I get two cursors, the custom and an iBar one on top of the other.
Here’s the code:
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
import mx.managers.CursorManager;
import mx.managers.CursorManagerPriority;
[Embed("grab.png")]
public static const grabbing:Class;
CursorManager.setCursor(grabbing, CursorManagerPriority.LOW, -16, -16);
]]>
</mx:Script>
<mx:List>
<mx:dataProvider>
<mx:ArrayCollection>
<mx:Array>
<mx:Object title="Stairway to Heaven" />
</mx:Array>
</mx:ArrayCollection>
</mx:dataProvider>
<mx:itemRenderer>
<mx:Component>
<mx:Text text="{data.title}"/>
</mx:Component>
</mx:itemRenderer>
</mx:List>
</mx:Application>
If anyone could help me figure out how to get rid of this iBar it would be much appreciated.
Thanks,
Chris
If you don’t need to select the text, e.g. for copy-paste, you may just set the selectable attribute to false
<mx:Text text="{data.title}"/ selectable="false">