Hi,
I already post this item but now I know whats wrong: I want to allow the
user to edit the items in a combobox. The problem is that the textchange
event works just one time (for the first changed letter) because he reset
the selectedindex of the combobox to -1. In debug mode I can't see where he
does this. How can I solve this?
My code sofar:
contactlijst is a structure and the volgnummer is the index of the item in
the combobox
If combobox.SelectedIndex > -1 Then
Dim i As Integer
For i = 0 To contactlijst.Length - 1
If (combobox.Text <> "") And (contactlijst(i).volgnummer =
ddlnaam.SelectedIndex) Then
If combobox.Text <> contactlijst(i).contactnaam Then
contactlijst(i).gewijzigd = True
contactlijst(i).contactnaam = combobox.Text
combobox.Items.Insert(contactlijst(i).volgnummer,c ontactlijst(i).contactnaam
)
combobox.Items.RemoveAt(contactlijst(i).volgnummer + 1)
combobox.SelectedIndex = contactlijst(i).volgnummer
combobox.Text =
combobox.Items.Item(contactlijst(i).volgnummer).To String
Exit Sub
End If
End If
Next
End If