I'm working with WindowsForms using C#, but I think the described control behaviour is language independent...
I have a form containing 3 comboboxes A, B and C, which have the taborder A.TabIndex=0, B.TabIndex=1 and C.TabIndex=2.
Combobox B is enabled/disabled depending on the content of A.Text in A's Validating event
(A.Text = "dis" disables combobox B, A.Text="other" enables combobox B):
sender, CancelEventArgs e)
if (A.Text ==
B.Enabled = false;
B.Enabled = true;
The behaviour following then is very strange (executed exactly in the given order):
1.) I'm entering "dis" in combobox A. When pressing the tab key, the Validating event disables combobox B.
Expected behaviour: Focus is moved to combobox C
Actual behaviour: Focus stays on combobox A
2.) I'm then entering "other" in combobox A and pressing the tab key.
Expected behaviour: Validating event is called and enables combobox B. Focus should then be on B.
Actual behaviour: Validating event is NOT called, therefore B is still disabled. Focus is now on C.
3.) I'm setting the focus on combobox A (using tab key or mouse) and
View Complete Post