Y yejunbo Unregistered / Unconfirmed GUEST, unregistred user! 2008-08-17 #1 如何使edit控件只能输入数字、小数点及“-”号?谢谢
Z zgh777 Unregistered / Unconfirmed GUEST, unregistred user! 2008-08-17 #2 procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char); begin if not (key in ['0'..'9','.','-']) then key := #0; end;
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char); begin if not (key in ['0'..'9','.','-']) then key := #0; end;
Z zgh777 Unregistered / Unconfirmed GUEST, unregistred user! 2008-08-19 #4 procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char); begin if not (key in ['0'..'9','.','-',#8]) then key := #0; end;
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char); begin if not (key in ['0'..'9','.','-',#8]) then key := #0; end;