Visual Studio 2010, C #
I have ComboBoxwith DropDown, AutoCompleteinstalled in SuggestAppend, and AutoCompleteSource- with ListItems. The user enters data into it until it is correctly entered. If the data matches one of the list items, the button next to the list is disabled.
If the user presses the tab key, the autocomplete function accepts the current sentence. It also moves on to the next control in the tab sequence that is included. Of course, since I want it to go to the forbidden button, I need to turn it on as soon as I confirm this entry.
The problem is that none of the events that I have tried, PreviewKeyDown, LostFocus, SelectedIndexChangedallows me to incorporate the button to complete it and get the focus. It always moves to the next button in tab order, which is always on.
I am ready to leave the button on and give it an error if it is pressed too soon, but I do not want to do this. I also don't want to have special mode flags to keep track of when these controls get focus. The check is more correct, but I'm stuck.
If it SelectedIndexChangedworked when the user made a match, that would be easy. It does not work when the field is cleared or when a match is found.
source
share