• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 162
  • Last Modified:

Preventing the BEEP with MaskEdit

How can I prevent the BEEP when entering a alpha char in a mask edit accepting only digits ?
0
skylinka
Asked:
skylinka
  • 2
1 Solution
 
viktornetCommented:
if not key in ['0'..'9'] then
  key := #0;

Regards,
Viktor Ivanov
0
 
skylinkaAuthor Commented:
Thank you. It works.
0
 
viktornetCommented:
you could also add the backspace key so you can delete the numbers if you want... This is the code to try out...

if not key in ['0'..'9', '.', #8] then
  key := #0;

Regards,
Viktor Ivanov
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now