Solved

Edit

Posted on 2001-08-28
4
162 Views
Last Modified: 2010-04-06
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)
0
Comment
Question by:ntony
  • 2
4 Comments
 
LVL 9

Accepted Solution

by:
ITugay earned 20 total points
ID: 6431376
Hi ntony,

procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
  if not (Key in ['0'..'9',#8,',']) then
    Key := #0;
end;
0
 
LVL 1

Author Comment

by:ntony
ID: 6431389
task it worked
0
 
LVL 9

Expert Comment

by:ITugay
ID: 6431391
fine...
0
 

Expert Comment

by:grini
ID: 6431676
Nu stiu omule si lasa-ma in pace
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question