Script only to Input Numbers in Delphi



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

Description:

This script is placed on the component "Edit1" on "Events: onkeypress"
So the data can be input only NUMBERS only, while the letter could not

0 komentar:

Posting Komentar