private void m_comboTextBox_KeyPress(object sender, KeyPressEventArgs e)
{
// These have important meanings we don't want to suppress by saying we handled it.
if (e.KeyChar == '\t' || e.KeyChar == '\r' || e.KeyChar == (char)Win32.VirtualKeycodes.VK_ESCAPE)
return;
if (DropDownStyle == ComboBoxStyle.DropDownList)
{
if (!Char.IsControl(e.KeyChar))
{
// We should drop the list down first, so that
// ScrollHighlightIntoView() will execute.
DroppedDown = true;
ListBox.HighlightItemStartingWith(e.KeyChar.ToString());
}
e.Handled = true;
}
}