5 Replies Latest reply on Jan 15, 2010 10:17 PM by Daniel___P

    Allowing identical entries in a List control

    Daniel___P

      Dear all,

       

      I am trying to put some data in a list control, but I cannot make my list accept duplicate entries.

      It actually accepts duplicates, but then I cannot select them anymore.

       

      Here is an example:

       

      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" applicationComplete="init()">

      <mx:Script>

      <![CDATA[

      import mx.collections.ArrayCollection;


      private var ac:ArrayCollection = new ArrayCollection(["a", "b", "a"]);

      private function init():void {

      l1.dataProvider = ac;

      }

      ]]>


      </mx:Script>

      <mx:List id="l1" width="100" />

      </mx:Application>

       

      This creates a nice list with the entries: "a", "b" and "a" -> the problem is that I cannot select the first "a" in the list - the selection goes to the last "a" !?

      But I need the first one also selectable !

       

      Does anybody have a clue how to get it working ?

       

      Thanks a lot in advance !

      Daniel