Autocomplete in Windows Forms FontComboBox
1 Oct 2018 / 1 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
Was this page helpful?
Yes
No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page