Disabling automatic listview find
I've just finished writing a routine to search for a row in my listview based on the character that the user types over the given column. I identify the column the mouse is over (MouseMove) and trap the character typed in (KeyPress) and then in a loop I compare the letter typed with the fist character of the subitem (corresponding to the column the mouse is over) in all listitems. If a match is found, the listitem is selected and I ensure it's visible. My problem is that the built-in feature that searches the Listview1.ListItems(x).Text for the typed character, does its own search after mine. The result is that it then positions itself to the first occurence of the character in Listview1.ListItems(x).Text, immediately after the occurence in the other column that I was searching on.
Listview columns and data:
Component ID_ CAS Number
29___________ 100-06-1
244___________ 112-30-1
250___________ 112-53-8
446___________ 120-14-9
188___________ 121-33-5
If the user types 1 over the CAS Number column it positions to Component ID 188. I've tested this with various numbers typed in and it consistently behaves this way. Typing letters in for others columns doesn't have this problem, presumably since the auto search cannot find an alphabetic value in the Component ID column.
It seems that the only way to prevent this is to disable that automatic feature. Anyone know how? Any other ideas?
Disabling automatic listview find [Resolved]
It works! You've just made some ladies in Germany (my users) very happy.