I have a list box with 5 selections. when and item in the list box is selected i want a combo box to populate with different selection. any ideas on how to get the combo box to populate?

I created a listbox and a combobox. I populated the listbox with the words (one per line) "the quick brown fox jumped over the lazy dog". I then added an event handler as follows:

Private Sub ListBox1_SelectedValueChanged(sender As Object, e As System.EventArgs) Handles ListBox1.SelectedValueChanged

    ComboBox1.Items.Clear()

    For i As Integer = 1 To ListBox1.Text.Length
        ComboBox1.Items.Add(Mid(ListBox1.Text, i, 1))
    Next

End Sub

Selecting a word in the listbox will causes the letters of that word to be put into the combobox. Is that what you are looking for?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.