我一直在使用代码AutoCompleteStringCollection
:如何在C#中使用AutoComplete获取事件“item selected”?
private void txtS_TextChanged(object sender, EventArgs e)
{
TextBox t = sender as TextBox;
string[] arr = this.dbService.GetAll();
if (t != null)
{
if (t.Text.Length >= 3)
{
AutoCompleteStringCollection collection = new AutoCompleteStringCollection();
collection.AddRange(arr);
this.txtSerial.AutoCompleteCustomSource = collection;
}
}
}
我怎样才能为“选择项”用户选择自动完成建议后的事件?和领域的价值?
从自动完成列表中选择的项目? – 2014-10-30 00:27:19
是的。从“自动完成”列表中选择的项目。 – 2014-10-30 00:31:21