Я пытаюсь использовать свойства автозаполнения, чтобы получить текстовое поле с предложениями, но текущий код не работает
private void MainForm_Load_1(object sender, EventArgs e)
{
this.dataGridView1.DataSource = global.sellableItems;
AutoCompleteStringCollection myCustomStringCollect = new AutoCompleteStringCollection();
myCustomStringCollect.AddRange(new string[]{"Facet Hatchet",
"Facet Fishing Rod",
"Facet Hat of Crafting",
"Facet Coat of Crafting",
"Facet Gloves of Crafting",
"Facet Trousers of Crafting",
"Facet Boots of Crafting",
"Facet Cap of Gathering",
"Facet Coat of Gathering",
"Facet Fingerless Gloves of Gathering",
"Facet Bottoms of Gathering",
"Facet Boots of Gathering"});
this.textBox1.AutoCompleteMode = AutoCompleteMode.Suggest;
this.textBox1.AutoCompleteSource = AutoCompleteSource.CustomSource;
this.textBox1.AutoCompleteCustomSource = myCustomStringCollect;
}
Как только он скомпилирован, я пробую его, но он не работает.