I have a tabControl in the form. In one of the tabItems, I have a text box (myTextBox). Let me call it tabItem1. When I write something in this text box placed in tabItem1, I want to focus the text box (searchTextBox) in tabItem2. I put this code in KeyDown from
tabItem2.Focus(); searchTextBox.Text = searchTextBoxTeropatik.Text; searchTextBox.Focus();
I wrote this little function for this purpose. But there is a big problem.
I press the key
tabItem2 gets focus.
But searchTextBox does not get focus. (My problem)
How can I solve this problem? Thanks for attention!
source share