delphi ListBoxAddItems() 不重复添加Edit1


本文整理自网络,侵删。

 

{不重复添加Edit1.text到列表框中} 
// 调用 ListBoxAddItems(Edit1,ListBox1);


procedure ListBoxAddItems(Edit:TEdit;ListBox:TListBox); 
begin 
   if ListBox.Items.IndexOf(Edit.Text)<0 then 
   begin 
       ListBox.Items.Add(Edit.Text); 
       Edit.SetFocus; 
   end; 
end;

相关阅读 >>

Delphi firemonkey在画布上绘制 imagelist图像

Delphi检查网络连接状态3种方式

Delphi显示 jpg、png、gif 图片及 gif 动画

Delphixe 如何调用stringtojstring

Delphi根据输入日期按年月周日输出日期段

Delphi检测本机的网络连接状态的三种方法

Delphi 侧边栏隐藏窗体

Delphi copyrect实现的几个图片的转换效果

Delphi filecreate 建立新文件

Delphi android / ios应用程序中使用tgeocoder类进行反向地理编码(从位置信息中获取地址)

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...