Hi Ravi. That was what I'm looking for. Thank you.
On 18 Mag, 05:46, Ravi Mishra <[email protected]> wrote:
> Hi DierRe,
>
> I didn't completely understand what is your requirement. But on the
> basis of what i understood is:
>
> 1. You have to write a custom event, where you will set the bubble
> value true for that particular event.
> 2. Then from the itemrenderer you will dispatch that event.
> 3. And finally you can attach the listener to the list for that event
> to listen that event on list.
>
> For more information, read Event Propagation in Flex livedocs.
>
> HTH,
>
> -Ravi
>
> On May 17, 8:37 pm, DierRe <[email protected]> wrote:
>
> > Hi! I'm writing down a simple itemRender with a single peculiarity: if
> > you have a mouseOver event on a entry of the list using this
> > itemRenderer it is shown a button so you can delete that entry.
> > This is the code:
>
> > <?xml version="1.0" encoding="utf-8"?>
> > <mx:HBox mouseOver="showButton(event)" mouseOut="hideButton(event)"
> > xmlns:mx="http://www.adobe.com/2006/mxml" >
>
> > <mx:Script>
> > <![CDATA[
>
> > public static const DELETE:String = "Delete";
>
> > private function showButton(event:Event = null):void
> > {
> > but.visible = true;
> > }
>
> > private function hideButton(event:Event = null):void
> > {
> > but.visible = false;
> > }
>
> > private function sendMessage(event:Event =
> > null):void
> > {
> > this.dispatchEvent( new Event( DELETE ) );
> > }
> > ]]>
> > </mx:Script>
>
> > <mx:Label text="{data.network_id}" />
> > <mx:Button id="but" click="sendMessage(event)" visible="false"
> > label="X" />
>
> > </mx:HBox>
>
> > Now, how can I listen to that event from the List using this item
> > renderer?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---