Good day! Tell me, please, where and how can I catch the EDBEditError exception for TMaskEdit , which appears when this very TMaskEdit loses focus? (if the value is not fully entered and the focus is lost, the message "Invalid input value. Use Escape key to abandon changes." pops up)

  • handle event onchange - Artyomich
  • Thank you all for your help! - leklerk

3 answers 3

No Only inherit from TCustomMaskEdit and block ValidateEdit and or ValidateError.

There the problem is that maskedit itself catches the CMExit message and checks input on it. Those. to OnExit, etc.

    try

    except

    finaly

    To help

      There is a solution. Found - throw:

        procedure TForm1.MaskEdit1Change(Sender: TObject); begin TMaskEdit(Sender).Modified := False; end;