AutoSuggestion TextBox

The Blog Demonstrate the use of a Simple TextBox as an AutoSuggestion TextBox

Description:

  • The method is so easy to handle.
  • For this we simply have set the AutoComplete*** Properties of TextBox with proper options.

Arrangements:

  • Set the AutoComplete*** properties as follows

AutoCompleteMode = SuggestAppend

AutoCompleteSource = CustomSource

  • Now we can add different words into Collection of AutoCompleteCustomSource Property of TextBox ---- OR --- from any file at runtime as follows....

Private Sub frmAutoSuggestion_Load(...)

TextBox1.AutoCompleteCustomSource.AddRange(File.ReadAllLines("..\..\Strings.txt"))

End Sub

Output:

image002.jpg

Note:-Sample String.txt is attached with blog.