This seems like it has probably been covered many times before, but
I'm having a hard time finding any discussion about it (probably just
searching the wrong terms).
Is there a way to capture whether the Text of a TextBox has been
changed by code or the user. I don't care if the Text is changed by
code, only if the user changes it. I actually figured out a solution
using a flag for the TextBox
something like:
OnKeyPress()
{
SetBoolFlag(true);
}
OnTextChanged()
{
if (BoolFlag == true)
DoSomething();
}
But, besides not liking how that works, it doesn't handle when a user
may "cut" text out of the TextBox using the mouse.
So, I'm back to my original problem. How can I find out (maybe at the
TextChanged event?) what caused the Text to change?
Any help is greatly appreciated,
Matt