WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ComboBoxAutoComplete

    Show / Hide Table of Contents

    Class ComboBoxAutoComplete

    ComboBoxAutoComplete derives from System.Windows.Forms.ComboBox and embeds an AutoComplete control to provide auto completion services for the ComboBox.

    Inheritance
    System.Object
    ComboBoxEx
    ThemedComboBox
    ComboBoxAutoComplete
    Implements
    ISupportOffice2007Theme
    IVisualStyle
    Inherited Members
    ThemedComboBox.OnDropDownClosed(EventArgs)
    ThemedComboBox.ISupportOffice2007Theme.EnableOffice2007Style()
    ThemedComboBox.IVisualStyle.VisualTheme
    ThemedComboBox.Office2010ColorTheme
    ThemedComboBox.Office2007ColorTheme
    ThemedComboBox.VisualStyle
    ThemedComboBox.ColorTable
    ComboBoxEx.CreateListBoxWindowHandle()
    ComboBoxEx.ReleaseListBoxWindowHandle()
    ComboBoxEx.OnHandleDestroyed(EventArgs)
    ComboBoxEx.OnEnter(EventArgs)
    ComboBoxEx.OnDrawItem(DrawItemEventArgs)
    ComboBoxEx.InitScrollersFrame()
    ComboBoxEx.CreateScrollersFrame()
    ComboBoxEx.AttachScrollersFrame(Control)
    ComboBoxEx.DetachScrollersFrame()
    ComboBoxEx.DrawItemText(DrawItemEventArgs)
    ComboBoxEx.OnIsStyledChanged()
    ComboBoxEx.CreateParams
    ComboBoxEx.IsStyled
    ComboBoxEx.ShowGripper
    ComboBoxEx.DropDownButtonMetroColorTable
    Namespace: Syncfusion.Windows.Forms.Tools
    Assembly: Syncfusion.Tools.Windows.dll
    Syntax
    public class ComboBoxAutoComplete : ThemedComboBox, ISupportOffice2007Theme, IVisualStyle
    Examples
    using Syncfusion.Windows.Forms.Tools;
    using System.Windows.Forms;
    namespace WFApplication1
    {
        public partial class Form1 : Form
        {
            ComboBoxAutoComplete comboBoxAutoComplete1 = new ComboBoxAutoComplete();
            public Form1()
            {
               InitializeComponent();
               this.comboBoxAutoComplete1.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
               this.comboBoxAutoComplete1.AutoCompleteCustomSource.AddRange(new string[] { "Custom", "Customizing", "Customizable" });
               this.comboBoxAutoComplete1.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
               this.comboBoxAutoComplete1.AutoCompleteSource = AutoCompleteSource.CustomSource;
               this.Controls.Add(comboBoxAutoComplete1);
             }
         }
    }

    Constructors

    ComboBoxAutoComplete()

    Initializes a new instance of the ComboBoxAutoComplete class.

    Declaration
    public ComboBoxAutoComplete()

    Properties

    AllowNewText

    Gets or sets whether user is allowed to enter new text.

    Declaration
    public bool AllowNewText { get; set; }
    Property Value
    Type Description
    System.Boolean

    AutoCompleteControl

    Returns the AutoComplete.

    Declaration
    public AutoComplete AutoCompleteControl { get; }
    Property Value
    Type Description
    AutoComplete

    DropDownHeight

    This property is obsolete.

    Declaration
    public int DropDownHeight { get; }
    Property Value
    Type Description
    System.Int32

    EnableTouchMode

    Gets or sets whether touch mode is to be enabled in ComboBoxAutoComplete.

    Declaration
    public bool EnableTouchMode { get; set; }
    Property Value
    Type Description
    System.Boolean

    Font

    Gets or sets the System.Drawing.Font value for the control.

    Declaration
    public override Font Font { get; set; }
    Property Value
    Type Description
    System.Drawing.Font

    ParentForm

    Gets or sets the ParentForm of the ComboBox.

    Declaration
    public Control ParentForm { get; set; }
    Property Value
    Type Description
    System.Windows.Forms.Control
    Remarks

    This property needs to be set to be the form on which this ComboBox control is placed. This is used by the AutoCompleteControl control.

    ReadOnly

    Gets or sets the value indicating whether changes can be done.

    Declaration
    public bool ReadOnly { get; set; }
    Property Value
    Type Description
    System.Boolean

    SelectedIndex

    Gets or sets the index of the currently SelectedItem.

    Declaration
    public int SelectedIndex { get; set; }
    Property Value
    Type Description
    System.Int32

    SelectedItem

    Gets or sets the currently selected item.

    Declaration
    public object SelectedItem { get; set; }
    Property Value
    Type Description
    System.Object

    SelectedValue

    Gets or sets the currently SelectedValue in AutoComplete Control when Syncfusion.Windows.Forms.Tools.ComboBoxAutoComplete.updateComboSelectionProperties is set .

    Declaration
    public object SelectedValue { get; set; }
    Property Value
    Type Description
    System.Object

    Text

    Gets or Sets Text according to the match. (overridden property)

    Declaration
    public override string Text { get; set; }
    Property Value
    Type Description
    System.String

    UpdateComboSelectionProperties

    Gets or sets value for updating AutoComplete with SelectedValue.

    Declaration
    public bool UpdateComboSelectionProperties { get; set; }
    Property Value
    Type Description
    System.Boolean

    Methods

    ApplyScaleToControl(Single)

    Apply Scale for controls

    Declaration
    public void ApplyScaleToControl(float scaleFactor)
    Parameters
    Type Name Description
    System.Single scaleFactor

    CreateAccessibilityInstance()

    Declaration
    protected override AccessibleObject CreateAccessibilityInstance()
    Returns
    Type Description
    System.Windows.Forms.AccessibleObject

    Dispose(Boolean)

    Releases the unmanaged resources used by the control and optionally releases the managed resources.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    true to release both managed and unmanaged resources; false to release only unmanaged resources.

    Overrides
    ThemedComboBox.Dispose(Boolean)

    Finalize()

    Declaration
    protected override void Finalize()

    OnDropDown(EventArgs)

    Override the OnDropDown method to show the AutoComplete drop down.

    Declaration
    protected override void OnDropDown(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    The event data.

    Overrides
    ThemedComboBox.OnDropDown(EventArgs)

    OnFontChanged(EventArgs)

    OnFontChanged event

    Declaration
    protected override void OnFontChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e
    Overrides
    ComboBoxEx.OnFontChanged(EventArgs)

    OnHandleCreated(EventArgs)

    Declaration
    protected override void OnHandleCreated(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e
    Overrides
    ComboBoxEx.OnHandleCreated(EventArgs)

    OnLeave(EventArgs)

    Raises the /> event Overides

    Declaration
    protected override void OnLeave(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    An System.EventArgs that contains the event data.

    Overrides
    ComboBoxEx.OnLeave(EventArgs)

    OnMouseUp(MouseEventArgs)

    Declaration
    protected override void OnMouseUp(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    OnParentChanged(EventArgs)

    Raises the System.Windows.Forms.Control.ParentChanged event.

    Declaration
    protected override void OnParentChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    An System.EventArgs that contains the event data.

    OnTextChanged(EventArgs)

    Raises the System.Windows.Forms.Control.TextChanged event.

    Declaration
    protected override void OnTextChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    An System.EventArgs that contains the event data.

    PreProcessMessage(ref Message)

    Preprocesses keyboard or input messages within the message loop before they are dispatched.

    Declaration
    public override bool PreProcessMessage(ref Message msg)
    Parameters
    Type Name Description
    System.Windows.Forms.Message msg

    A System.Windows.Forms.Message, passed by reference, that represents the message to process. The possible values are WM_KEYDOWN, WM_SYSKEYDOWN, WM_CHAR, and WM_SYSCHAR.

    Returns
    Type Description
    System.Boolean

    true if the message was processed by the control; otherwise, false.

    ProcessCmdKey(ref Message, Keys)

    Declaration
    protected override bool ProcessCmdKey(ref Message m, Keys key)
    Parameters
    Type Name Description
    System.Windows.Forms.Message m
    System.Windows.Forms.Keys key
    Returns
    Type Description
    System.Boolean

    SetSelectedItem(String)

    To set SelectedItem in ComboBoxAutoComplete, when loading AutoComplete control as its DropDown.

    Declaration
    public void SetSelectedItem(string value)
    Parameters
    Type Name Description
    System.String value

    Represents the value of SelectedItem.

    WndProc(ref Message)

    Override WndProc.

    Declaration
    protected override void WndProc(ref Message m)
    Parameters
    Type Name Description
    System.Windows.Forms.Message m
    Overrides
    ComboBoxEx.WndProc(ref Message)

    Implements

    ISupportOffice2007Theme
    IVisualStyle
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved