472,099 Members | 2,380 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,099 software developers and data experts.

still problem editing items in combobox

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
0 2284

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Wayne Wengert | last post: by
3 posts views Thread by Varun | last post: by
5 posts views Thread by Wally | last post: by
1 post views Thread by Gian Paolo | last post: by
3 posts views Thread by samoore33 | last post: by
reply views Thread by Frnak McKenney | last post: by
5 posts views Thread by Kevinp | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.