Note that there are some explanatory texts on larger screens.

plurals
  1. POCan't interact with children of an itemRenderer in Flex 4 Gumbo
    primarykey
    data
    text
    <p>I thought this would be pretty easy but I'm running into all sorts of problems with this. I have an ItemRenderer with a an image and two labels. I want to assign separate mouse events to the image and two labels. It seems like the item renderer is treated like a single interactive piece and I haven't found a way to override that. I couldn't even disable the default rollover effect so I had to style the rollOverColor to match my background.</p> <p>Can anyone provide a solution?</p> <pre><code>&lt;s:DataGroup id="browserDataGroup" dataProvider="{model.userBoardList}" verticalCenter="0" left="10" rollOverColor="0x424242" itemRenderer="edu.xxxxx.components.board.BrowserItemRenderer"&gt; &lt;!--itemrenderer code below --&gt; &lt;s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/halo" xmlns:ns="library://ns.adobe.com/flex/mx" buttonMode="true" useHandCursor="true" mouseChildren="true"&gt; &lt;s:states&gt; &lt;s:State name="up"/&gt; &lt;s:State name="over"/&gt; &lt;/s:states&gt; &lt;s:layout&gt; &lt;s:VerticalLayout gap="2"/&gt; &lt;/s:layout&gt; &lt;s:Group&gt; &lt;ns:Image id="image" source="{data.thumbnail}" addedEffect="Fade" completeEffect="Fade" removedEffect="Fade" width="130" height="89" horizontalCenter="0" verticalCenter="0"/&gt; &lt;s:Rect id="imageRect" width="130" height="89"&gt; &lt;s:stroke&gt; &lt;s:SolidColorStroke color="0xFFFFFF" joints="miter" pixelHinting="true"/&gt; &lt;/s:stroke&gt; &lt;/s:Rect&gt; &lt;/s:Group&gt; &lt;s:Label text="{data.title}" color="0xFFFFFF" fontWeight="bold"/&gt; &lt;s:Group&gt; &lt;s:layout&gt; &lt;s:HorizontalLayout gap="3"/&gt; &lt;/s:layout&gt; &lt;s:Label text="Edit" color="0xFFFFFF" click="trace('edit');" textDecoration.up="underline" textDecoration.over="none"/&gt; &lt;s:Label text="|" color="0xFFFFFF"/&gt; &lt;s:Label text="Delete" color="0xFFFFFF" click="trace('delete');" textDecoration.up="underline" textDecoration.over="none"/&gt; &lt;/s:Group&gt; &lt;/s:ItemRenderer&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload