if i have these lines in my TextBox_Validating the tabstop on the TextBox will fired twice:
((TextBox)sender).AutoCompleteCustomSource.AddRange(new string[]
{
((TextBox)sender).Text,
});
But if remove the lines above the Tabstop works fine and fired only once?
This is the whole function:
private void TextBox_Validating(object sender, EventArgs e)
{
if (!((TextBox)sender).AutoCompleteCustomSource.Contains(((TextBox)sender).Text) && ((TextBox)sender).TextLength > 0)
{
((TextBox)sender).AutoCompleteCustomSource.AddRange(new string[]
{
((TextBox)sender).Text,
});
SaveHistoryTextBox(((TextBox)sender));
}
}