关于TEdit的简单问题(30分)

  • 主题发起人 panduola
  • 开始时间
P

panduola

Unregistered / Unconfirmed
GUEST, unregistred user!
怎么让TEdit里面只可以输入浮点型的数字
 
老问题了。
在Edit的KeyPress中写:
if not (key in['-','.','0'..'9']) and (key <>#8) then key:=#0;
 
在Onkeypress 和 OnExit 中控件。

 
用RXLIB的更好用
www.playicq.com
 
在Edit的KeyPress中写:
if not (key in['-','.',char(13),char(8),'0'..'9']) then
key:=#0;
 
KeyPress中写:
if not (key in['-','.',char(13),char(8),'0'..'9']) then
key:=#0;
 
接受答案了.
 
顶部