Mettre dans OnKeyPress: procedure TMain.Edit1KeyPress(Sender: TObject; var Key: Char); begin if not (key in ['0'..'9',#8]) then key := #0; end;