Nevron Forum

NComboBox AutoComplete single character item select not working

https://www.nevron.com/Forum/Topic8787.aspx

By Craig Swearingen - Wednesday, November 12, 2014

I have an NComboBox with an auto complete suggestion list on my window.  Some of my items are only one character long for selection.  After typing the one character and pressing Enter instead of using the character typed it will revert back to what was previously shown.  Seems to work fine when typing more than one character and pressing Enter.

Below I've added code which you can drop on a Form to experiment with this issue.  It has both an NComboBox and a WinForm ComboBox which are configured similarly.  The WinForm ComboBox works as expected.  The NComboBox has the bug mentioned.  I see this on build 13.11.26.12.

I would prefer to use the NComboBox given its other features.  Is there a workaround for this bug in it?

   string[] syms = new string[] { "a", "aa", "b", "ba", "c" };
    //Nevron combobox
    cboSymbols = new Nevron.UI.WinForm.Controls.NComboBox();
    cboSymbols.Editable = true;
    cboSymbols.Location = new System.Drawing.Point(47, 100);
    cboSymbols.Name = "cboSymbols";
    cboSymbols.Size = new System.Drawing.Size(100, 22);
    cboSymbols.TabIndex = 0;
    Controls.Add(this.cboSymbols);
    cboSymbols.Items.AddRange(syms);
    cboSymbols.EditControl.AutoCompleteMode = AutoCompleteMode.Suggest;
    cboSymbols.EditControl.AutoCompleteSource = AutoCompleteSource.CustomSource;
    AutoCompleteStringCollection ac = new AutoCompleteStringCollection();
    ac.AddRange(syms);
    cboSymbols.EditControl.AutoCompleteCustomSource = ac;
    //Windows combobox
    winComboBox = new System.Windows.Forms.ComboBox();
    winComboBox.FormattingEnabled = true;
    winComboBox.Location = new System.Drawing.Point(47, 163);
    winComboBox.Name = "winComboBox";
    winComboBox.Size = new System.Drawing.Size(121, 21);
    winComboBox.TabIndex = 1;
    Controls.Add(this.winComboBox);
    winComboBox.Items.AddRange(syms);
    winComboBox.AutoCompleteMode = AutoCompleteMode.Suggest;
    winComboBox.AutoCompleteSource = AutoCompleteSource.CustomSource;
    AutoCompleteStringCollection x = new AutoCompleteStringCollection();
    x.AddRange(syms);
    winComboBox.AutoCompleteCustomSource = x;

By Nevron Support - Monday, November 17, 2014

Hello Craig,

We will fix this problem in the next release.