protected override void OnKeyPress (KeyPressEventArgs e)
{
if (dropdown_style == ComboBoxStyle.DropDownList)
{
int index = FindStringCaseInsensitive (e.KeyChar.ToString (), SelectedIndex + 1);
if (index != -1)
{
SelectedIndex = index;
if (DroppedDown)
{
//Scroll into view
//TODO
//if (SelectedIndex >= listbox_ctrl.LastVisibleItem ())
// listbox_ctrl.Scroll (SelectedIndex - listbox_ctrl.LastVisibleItem () + 1);
// Or, selecting an item earlier in the list.
//if (SelectedIndex < listbox_ctrl.FirstVisibleItem ())
// listbox_ctrl.Scroll (SelectedIndex - listbox_ctrl.FirstVisibleItem ());
}
}
}
base.OnKeyPress (e);
}