mimou_2009
mimou_2009

Reputation: 47

Edit Message Error of tcxDateEdit

I'm using Delphi 7. I use the component tCxDateEdit, in ValidationOptions , I put the evoRaiseException a false the evoshowErrorIcon a true When I inser a wrong date like "31/02/2015" , an Icon appear next to my date component and I have a message error like "Date incorrecte" there are a way to change the Error message?

thanks in advance.

Upvotes: 1

Views: 527

Answers (1)

MartynA
MartynA

Reputation: 30735

You can modify the displayed text in the control's OnValidate event like this

procedure TForm1.cxDBDateEdit1PropertiesValidate(Sender: TObject;
  var DisplayValue: Variant; var ErrorText: TCaption; var Error: Boolean);
begin
  ErrorText := DisplayValue + ' is not a valid date';
end;

Upvotes: 4

Related Questions