I have populated some items into a listbox using the datasource property. Now I need to set the AutoCompleteCustomSource for a textBox from the items listed in the listbox. Prec
If your ListBox is a list of strings, you should be able to do this: (untested)
textBox.AutoCompleteMode = AutoCompleteMode.SuggestAppend; textBox.AutoCompleteSource = AutoCompleteSource.CustomSource; textBox.AutoCompleteCustomSource.AddRange((List)listBox.DataSource);