Controlled Focus event - textBox
C#
3
Posts
2
Posters
0
Views
1
Watching
-
I need leave my textBox control only if I press three times the Tab key. I use this:
private void KKEditControl_Leave(object sender, EventArgs e) { this.Focus(); }
but it keeps focus in my textBox all the time. Please help me... -
You need to count how much times he leaves. try this:
int NumLeaves = 1; private void KKEditControl_Leave(object sender, EventArgs e) { if (NumLeaves%3 != 0) this.Focus(); NumLeaves++; }
This should work.