The combo box which I created is not auto completing words stored in a list after typing in the first letter and quickly pressing "Tab". However if you type in slowly and then press "Tab". It's auto completes. I have figured out that the issue is with the key_down event. When you keep a key pressed then press "Tab" it doesn't auto completes, where as if you release the key and then press "Tab" it auto completes.
If I start typing in the second character and then "Tab" out it auto completes.
Key_up event:
private void cboReasonCd_KeyUp(Object eventSender, KeyEventArgs eventArgs)
{
int KeyCode = (int)eventArgs.KeyCode;
int Shift = (int)eventArgs.KeyData / 0x10000;
CancelFillCbo.ComboReasonCD_KeyUp(KeyCode, Shift);
}
Here CancelFillCbo is the form name and ComboReasonCD method is used to populate the list.
Key_Down event:
private void cboReasonCd_KeyDown(object sender, KeyEventArgs e)
{
mlCurrentPosition = cboReasonCd.SelectionStart;
}
cboReasonCd is the name of combo box.