本文整理自网络,侵删。
{不重复添加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 windows 编程[3] - 学习窗体生成的过程三
Delphi tstreamwriter tstreamreader 流操作3
更多相关阅读请进入《Delphi》频道 >>