combobox problem
-
Hi im using a combobox which is populated with a fairly large amount of items (no databind). The problem im having is that sometimes when I expand the combobox it wont stay open as it should so I can scroll down/up through the items, instead it closes as soon as you release the mouse button. Anyone have any idea to why this is happening? /thanks
-
Hi im using a combobox which is populated with a fairly large amount of items (no databind). The problem im having is that sometimes when I expand the combobox it wont stay open as it should so I can scroll down/up through the items, instead it closes as soon as you release the mouse button. Anyone have any idea to why this is happening? /thanks
Hello, One possibility is that you move the mouse outside the Controls area, while the mouse button is pressed. If you than release the button, the items are still all visible! This is per design! You could make a workaround like this.
private void comboBox1_MouseLeave(object sender, System.EventArgs e) { if(this.comboBox1.DroppedDown) this.comboBox1.DroppedDown = false; }
Or inherit your own combobox, and override OnMouseLeave.All the best, Martin
-
Hello, One possibility is that you move the mouse outside the Controls area, while the mouse button is pressed. If you than release the button, the items are still all visible! This is per design! You could make a workaround like this.
private void comboBox1_MouseLeave(object sender, System.EventArgs e) { if(this.comboBox1.DroppedDown) this.comboBox1.DroppedDown = false; }
Or inherit your own combobox, and override OnMouseLeave.All the best, Martin
-
Hmm sorry to say, but that is not the case. The combobox opens on mouse down and closes on mouse up even though the pointer never leves the combobox control area.
-
Hi im using a combobox which is populated with a fairly large amount of items (no databind). The problem im having is that sometimes when I expand the combobox it wont stay open as it should so I can scroll down/up through the items, instead it closes as soon as you release the mouse button. Anyone have any idea to why this is happening? /thanks
Hi frnd, you have to give the code, So that i can help u...:cool: Nisar Inamdar.