Hello ,
you can use the change event and in change event you can have following
code:
public function changeEvt(event:Event):void {
trace(event.currentTarget.selectedItem);
trace(event.currentTarget.selectedItem.label);
trace(event.currentTarget.selectedIndex);
}
-----------------------------
<mx:list change="changeEvt(event)">
</mx:list>
Regards,
Mahek
On Mon, Sep 13, 2010 at 12:15 AM, lalith <[email protected]> wrote:
> how to identify the item which is clicked in mx:List?
>
> <mx:List id="storyList" width="100%"
> dataProvider="{this.currentDoc.stories}" click="myLabelFunc(event)"
> height="100%" variableRowHeight="true" selectable="false"
> borderStyle="none"
> itemRenderer="com.renderers.StoryRenderer">
> </mx:List>
>
> ---------
> public function myLabelFunc (event:Event):void {
> Alert.show("working finally" + storyList.editedItemPosition);
> Alert.show("working finallyn 1" + storyList.);
>
>
> }
>
> storyList.editedItemPosition ---> this does not give correct value...
>
> --
> 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]<flex_india%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/flex_india?hl=en.
>
>
--
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.