2 Replies Latest reply on Dec 1, 2009 4:45 AM by Karam Chandrabose

    How to add itemclick event listeners programatically

    Karam Chandrabose

      I have a horizontal List for which I need to assign a method to a ItemClick event

       

      in MXML i can do it with the following code,

      <mx:HorizontalList id = "hlst1" itemClick="ClickHandler()" />

       

      But in my application I cannot use MXML as the horizontal lists are dynamically generated,

      in that case how do I assign a ItemClick event handler?