I have a main listbox, which the content is in form of dynamic arrays. Upon click on some of the item in the listbox, some other arrays are suppose to appear in another listbox, by checking that both of them have the same "title".

I was thinking of using listener to listen to the main listbox, but it does not work. Can anyone suggest a better way to solve this?

btw, i saw one tutorial at www.flash-mx.com its something like the dependable combobox tutorial, but the arrays are 2 different arrays, unlike the one in the tutorial.



Private Sub List1_Click()
   MsgBox List1.ListIndex
End Sub

You can detect which item is clicked


List2.AddItem "blablabla"

you can add an item to the second listbox.


Private Sub List1_Click()
  Select Case List1.Listindex
    Case 0
      msgbox "1st item"
    Case 1
      msgbox "2nd item"
    Case 2
      msgbox "3th item"
    Case Else
      msgbox "oeps dunno?"
  End Select
End Sub

But here you have to know how many items are in List1!