954,598 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

listbox to respond to another listbox

hi

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.

thanks

ozeona
Newbie Poster
12 posts since Jul 2005
Reputation Points: 10
Solved Threads: 0
 

With:

Private Sub List1_Click()
   MsgBox List1.ListIndex
End Sub



You can detect which item is clicked

With

List2.AddItem "blablabla"


you can add an item to the second listbox.

Or:

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!

PVBert
Junior Poster in Training
61 posts since Mar 2007
Reputation Points: 10
Solved Threads: 5
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: