Below is a short example in Flex on how to access data from a list item on mouse over. I’m using the rowIndex property of itemRollOver event to access the index at which the mouse is currently positioned.
<?xml version=”1.0″?>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml”>
<mx:Script>
<![CDATA[
import mx.events.ListEvent;
var oceans:Array = ["Pacific", "Atlantic", "Indian", "Artic", "Southern"];
public function displayItem(event:ListEvent):void {
displayTxt.text = displayList.dataProvider[event.rowIndex];
}
]]>
</mx:Script>
<mx:List id="displayList"
dataProvider="{oceans}"
itemRollOver="displayItem(event)" />
<mx:TextArea id="displayTxt"/>
</mx:Application>
hey
Its a great solution,
thanx for this wonderful solution
verygud posting
Nice. Glad to come upon your post.
Andy
How Will i get rendered value instead of Dataprovider value. I have used renderer for columns
Hi, its a great solution for Menu Item list. Do you know if we can get the same functionality, when user puts his mouse cursor on a folder in sharepoint, so that it gives the text list of items inside it??