Order Of Events not Consistent

  • Thread starter Thread starter Elmer Miller
  • Start date Start date
E

Elmer Miller

I have found that the order of events when leaving a control are not
consistent but vary depending on whether you use Tab or the mouse to leave
the control. This behavior is documented (see link below) so it appears to
be by design, but I can't figure out why this should be the case. In one
case validating occurs before lostfocus, and in the other case lostfocus
occurs before validating. This is causing problems for me. Could someone
please explain the reasoning behind this inconsistency?
Thanks.

http://msdn.microsoft.com/library/d...emwindowsformscontrolclassvalidatingtopic.asp
 
Not an answer, just a note. I've had nasty "bugs" show up when the coder is
a mouser and the user is a keyboarder. Or vice versa. Difficult to
reproduce. I'd like to know the "rules" for taking care of both.

Mike
 
I also do not have an answer behind the reasoning, but I do know how to make things a little more consistent in your specific example

The .NET Framework documentation states that you should not use "LostFocus" if possible
 
Back
Top