P pckite2 Unregistered / Unconfirmed GUEST, unregistred user! 2002-08-12 #1 如何限定edit1.text只能输入数字及小数点呢?
H hzwhzw Unregistered / Unconfirmed GUEST, unregistred user! 2002-08-12 #2 procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char); begin if not (key in['0'..'9',#13,#8]) then key:=#0; end;
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char); begin if not (key in['0'..'9',#13,#8]) then key:=#0; end;
P pxx Unregistered / Unconfirmed GUEST, unregistred user! 2002-08-16 #6 此方法不是很好,因为小数点可重复输入,如何限制小数点个数很不好做,所以我找了个控件。