小编vit*_*izu的帖子

如何在C#中使用AutoComplete获取事件"项目选择"?

我有使用的代码AutoCompleteStringCollection:

    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;
            }
        }
    }
Run Code Online (Sandbox Code Playgroud)

在用户选择自动完成建议后,如何才能获得"项目选择"的事件?和领域的价值?

c# autocomplete

5
推荐指数
1
解决办法
9196
查看次数

标签 统计

autocomplete ×1

c# ×1