0

When I selected the mx:List, how can I make the mx:Image display the selected item?

<mx:List id="dataList" dataProvider="{mdataList}" width="100%" height="190" >
<mx:itemRenderer>
 <mx:Component>      
  <mx:HBox height="30" borderStyle="solid" cornerRadius="10" width="100%" horizontalScrollPolicy="off" verticalScrollPolicy="off">
   <mx:Image name="icon" source="@Embed(source='Images/see.png')"  visible="false"/>
   <mx:Label width="165" height="100%" text="{data.legend}" />
   <mx:Label name="txt" width="20" height="100%" text="{data.Name}"  visible="false" />
  </mx:HBox>
 </mx:Component>
</mx:itemRenderer>

Simon MᶜKenzie
  • 8,344
  • 13
  • 50
  • 77
guh
  • 1
  • add the itemClick event to the List – fmodos Jul 16 '13 at 05:13
  • I don't understand. The only mx:Image you shown us is in an itemRenderer. IT will be displayed for every displayed element of the list; regardless of whether that item is selected or not. Perhaps you should edit your question to elaborate on how you want "the mx:Image" to display the selected item"? – JeffryHouser Jul 16 '13 at 11:33

0 Answers0