Well... This is normal behaviour of control with
AutoCompleteCustomSource[
^], because it
automatically completes input strings by comparing the prefix being entered to the prefixes of all strings in a maintained source.
If you would like to change it, you have to create
textBox1_Click
event and there you can implement a method which compare entered string with a string of custom source. For example:
TextBox txt = (TextBox)sender;
if(txt.Text.Length<2) return;
string s = txt.Text;
s = txt.AutoCompleteCustomSource.OfType<string>.FirstOrDefault(x=> x.Contains(s));
if(s != string.Empty) txt.Text = s;
It works as expected, when below properties of
TextBox
are set as shown:
AutoCompleteMode = SuggestAppend;
AutoCompleteSource = CustomSource;