By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,060 Members | 1,225 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,060 IT Pros & Developers. It's quick & easy.

still problem editing items in combobox

P: n/a
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
End If
Nov 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.