本文整理自网络,侵删。
判断字符串是否包含限制以外的字符 否则置空procedure TMainForm.cbSearchExit(Sender: TObject); //判断退出事件varJ:Integer;K:String;begin K := TsEdit(Sender).Text;for J:=1 to Length(K) do beginif not(K[J] in ['0'..'9','a'..'z','A'..'Z']) then beginTsEdit(Sender).Text:='';end;end;end;可以使用下列方法将不符合的字符突出显示出来TsEdit(ctl).SelectAllTsEdit(ctl).SelLengthTsEdit(ctl).SelStartTsEdit(ctl).SelText――――――――――――――――
原文链接:https://blog.csdn.net/u010431493/article/details/79785430
相关阅读 >>
idhttp相关:伪造来源地址、cookie欺骗、通过代理访问
学习使用Delphi for android 调用java类库
更多相关阅读请进入《Delphi》频道 >>