Ranjeet Ranjeet - 1 year ago 95
C# Question

Combo box autocomplete blanks when down key pressed C# windows

When selecting an item in the combobox list, the user can start typing the first few letters of the name and the combobox narrows the selection accordingly. It also shows another drop down menu of items that may match the user's selection. (suggest feature of autocomplete)
if the user uses the arrow keys to move down the suggested list then presses down key; (the logical thing to do to confirm a suggested selection), the text inside the combo box selected rather than the selected item.

Any idea how to disable down key working in dropdownlist of combo box?

Here result is shown in auto-complete suggestion. When
I press down key record in combo box dropdown list selected,
rather than the auto-complete suggestion.

Answer Source

private void comboBox1_KeyDown(object sender, KeyEventArgs e) { e.Handled = true; }

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download