Solved

Edit

Posted on 2001-08-28
4
160 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

809 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