S
Steven Spits
Hi,
I have a textbox that should be numeric, so I've written some code in the
Validating event. When the text was changed (and if it's valid!), I need to
compute some other values. I've done this in the Validated event.
However, when the users tabs over that field, the Validating & Validated
event is triggered even if nothing changed.
I've solved this by setting textbox.Tag to false in the Enter event. In the
TextChanged event the tag is set to true and in the Validated event I only
run the code if the tag is true.
Isn't there a better way? Some .IsDirty property?
Steven
- - -
I have a textbox that should be numeric, so I've written some code in the
Validating event. When the text was changed (and if it's valid!), I need to
compute some other values. I've done this in the Validated event.
However, when the users tabs over that field, the Validating & Validated
event is triggered even if nothing changed.
I've solved this by setting textbox.Tag to false in the Enter event. In the
TextChanged event the tag is set to true and in the Validated event I only
run the code if the tag is true.
Isn't there a better way? Some .IsDirty property?
Steven
- - -