Autocomplete in Windows Forms FontComboBox

27 Apr 20211 minute to read

The AutoComplete feature of the FontComboBox can be turned on\off depending upon the type of behavior that is required for the FontComboBox control. The below properties enables the auto complete feature.

Properties Description
UseAutoComplete Specifies whether auto complete feature is implemented in the control.
AutoCompleteSource Specifies the source of the complete strings used for auto completion. DropDownStyle property should be set to "DropDown" to make this setting effective.
AutoCompleteCustomSource Represents the collection of string for the custom source, when AutoCompleteSource is set to CustomSource.
// Enables AutoComplete feature.
this.fontComboBox1.UseAutoComplete =true;
this.fontComboBox2.AutoCompleteCustomSource.AddRange(new string[] { "Calibri", "Cambria", "Candara"});
this.fontComboBox2.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.fontComboBox2.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource;
' Enables AutoComplete feature.
Me.fontComboBox1.UseAutoComplete = True
Me.fontComboBox2.AutoCompleteCustomSource.AddRange(New String() {"Calibri", "Cambria", "Candara"}) 
Me.fontComboBox2.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend
Me.fontComboBox2.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource


See Also

DropDown Settings