Delphi我写的类似功能带历史记忆,并模糊带出功能的Edit
先在ListBox1的Items里添加数据

再拖一个ListFilterEdit1到界面上,设置它的FilteredListBOx设为ListBox1即可,同样也可以设置 是否 大小写 敏感,从头开始匹配等

即可看到过滤效果

获得选中行
procedure TForm1.ListBox1KeyPress(Sender: TObject; var Key: char); begin if (key=#13) and (ListBox1.Items.Count>0) then begin ListFilterEdit1.Text:= ListBox1.Items[ListBox1.ItemIndex]; ListFilterEdit1.SetFocus; end end;
同样适合CheckListBox1


同样适合ColorListBox1


同样适合FileListBox1


浙公网安备 33010602011771号