I have a problem where scrolling in both a toolStripComboBox and regular ComboBox is really slow.
This happens both using the arrowkeys and the mouse scrollwheel. However, if I use the scrollbar it behaves as expected.
Here's the toolstrip combobox:
//
// toolStripComboBoxDeild
//
this.toolStripComboBoxDeild.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.toolStripComboBoxDeild.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.toolStripComboBoxDeild.DropDownWidth = 121;
this.toolStripComboBoxDeild.Items.AddRange(new object[] {
"Allir"});
this.toolStripComboBoxDeild.Margin = new System.Windows.Forms.Padding(1, 0, 8, 0);
this.toolStripComboBoxDeild.MaxDropDownItems = 24;
this.toolStripComboBoxDeild.Name = "toolStripComboBoxDeild";
this.toolStripComboBoxDeild.Size = new System.Drawing.Size(200, 52);
this.toolStripComboBoxDeild.SelectedIndexChanged += new System.EventHandler(this.toolStripComboBoxDeild_SelectedIndexChanged);
I'm adding the rest of the data in the combobox with an SqlDataReader (not using a dataset because I'm comfortable using the sqlreader).
and the regular combobox:
//
// comboBox1
//
this.comboBox1.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
this.comboBox1.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.comboBox1.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Location = new System.Drawing.Point(77, 17);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(221, 21);
this.comboBox1.TabIndex = 1;
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
Has anyone ever run into this problem? If so, what did you do to solve it?
EDIT
Changing the event handler to SelectionChangeCommitted solved the problem regarding the arrow keys, but not the mouse part.
The mouse scrolling behaviour is only aberrant when the mouse is over the dropdown list. When I click the combobox down arrow without moving the mouse and apply the scroll wheel, the list scrolls as expected.
EDIT 2
Figured out the problem with the mouse scrolling, turns out that it's the "Lenovo Mouse Suite" software and/or driver. Uninstalled it and now everythings just fine.
Thanks to Jeff Yates for showing me the SelectionChangeCommitted event.