The UltraMaskedEdit control has functionality to impose a minimum and maximum value.
If the user uses the spin functionality to scroll through the available values, the numbers displayed are between the minimum and maximum as expected.
(e.g. If the minimum is 1 and the maximum is 5, then scrolling would go through numbers 1, 2, 3, 4, 5, 1, 2....)
If however the user manually enters a number using the keyboard that is outside this range, they are prevented from leaving the field until the mistake is rectified, but no error provider is displayed to indicate why.
Is there any way to display an error or automatically display a tooltip so the user is informed of the reason why they can't leave the field? (e.g. "This field requires a minimum value of X")
Many Thanks.
Katie
I believe the control fires the MaskValidationError event under these circumstances. Unfortunately the event arguments do not contain a property that describes the reason, although in situations like this one it is self-evident. You should be able to handle this event and set the Message property of the event arguments to a string containing the message you want to display.
Thanks for the reply.
I can't seem to get this event to fire. I think this is because the event is described as occuring when the control loses focus, but given the input is invalid it won't allow the user to leave the control and so the control does not lose focus.