Edit

is there a property or method for edit box that let users write only numeric characters (in editbox).
(i don't want to use MaskEdit)
LVL 1
ntonyAsked:
Who is Participating?
 
ITugayCommented:
Hi ntony,

procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
  if not (Key in ['0'..'9',#8,',']) then
    Key := #0;
end;
0
 
ntonyAuthor Commented:
task it worked
0
 
ITugayCommented:
fine...
0
 
griniCommented:
Nu stiu omule si lasa-ma in pace
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.