Jump to content

How to Validate data 'OnExit' using ClientEvents?


Recommended Posts

Posted

Hi... ;)

 

I want to validate input data to edit control at client side using the "clientevents" property on the Form, how can I do that?

 

I want to do this:

procedure TMainForm.UniEdit2Exit(Sender: TObject);
var
a:double;
begin
if ansipos('.',UniEdit2.Text)=0 then
begin
  a:=strtofloat(UniEdit2.Text);
  UniEdit2.Text:=formatfloat('0.00',a);
end;
end;

 

Thank you,

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...