c#TextBox输入框自动提示、自动补全功能
程序员文章站
2022-06-01 12:47:41
...
1、windows窗体
private void Form1_Load(object sender, EventArgs e)
{
var source = new AutoCompleteStringCollection();
source.AddRange(new string[]{
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
});
textBox1.AutoCompleteCustomSource = source;
textBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
textBox1.AutoCompleteSource = AutoCompleteSource.CustomSource;
}
相关说明:
上一篇: 18.小丑排序
下一篇: ubuntu下修复 tab键自动补全