AutoSuggestion TextBox

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:


Regards,
Mayur Dighe
http://ImmortalDotNet.blogspot.com
http://MayurDighe.wordpress.com