if not (key in [‘0‘..‘9‘,#8]) then key := #0;
Delphi edit只允许输入数字
原文:https://www.cnblogs.com/windson/p/12569072.html