A amos_3_1 Unregistered / Unconfirmed GUEST, unregistred user! 2004-02-06 #1 edit 控件我屏蔽了除键入数字外的所有的事件,结果我想删除时只能用delete键,不能用backspace键,很麻烦,我怎么让 backspace用起来,谢谢
0 011101 Unregistered / Unconfirmed GUEST, unregistred user! 2004-02-06 #2 找到backspace鍵的鍵值,然后允許在Tedit中按此鍵.
O oiwin Unregistered / Unconfirmed GUEST, unregistred user! 2004-02-07 #4 这样就可以了 procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char); begin case key of '0'..'9', #8, #46://#8是backspace键,#46是delete键 else//如果不是以上键就屏蔽 key := #0; end; end; 上面代码我试过了,可行.
这样就可以了 procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char); begin case key of '0'..'9', #8, #46://#8是backspace键,#46是delete键 else//如果不是以上键就屏蔽 key := #0; end; end; 上面代码我试过了,可行.
X xycall Unregistered / Unconfirmed GUEST, unregistred user! 2004-02-08 #5 同意oiwin得用法 You friend Xycall; you can send email:zzhs@163.com, if you want to discuss with me!