How to change a list view from a Combo on VB6

Asked

Viewed 246 times

0

I made a form with a ListView and a ComboBox, my problem is that according to what is selected in ComboBox I have to change the data from ListView.

For example: I have the ListView LETTERS (which is already loaded with values in Load_Form) and a type combo (consonants and vowels), if in the combo I select 'vowels' it has to appear 'a,e,i,o,u' in the ListView.

  • You even tried to use the event Click of ComboBox?

1 answer

1

You should use the combo box events for this. Create a method to popular the listview type

Private Sub PopularListView(ByVal letra As String)
    'Adicionar as linhas conforme a letra passada por parâmetro
End Sub

Then call this method in the combobox Change event:

Private Sub Combo_Change()
    Call PopularListView(Combo.Text)
End Sub

Roughly speaking that’s it.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.