Re: Ctrl+Enter on a combobox automatically selects item beginning with



Colmeister <Colmeister@xxxxxxxxxxxxxxxxxxxxxxxxx>'s wild
thoughts were released on Mon, 13 Mar 2006 03:03:09 -0800
bearing the following fruit:

Does anyone know why pressing Ctrl+Enter (with the focus on the combobox)
automatically selects the first item in the combo beginning with the letter J?

Surely this has to be a bug in the combobox. The problem can be reproduced
by simply creating a new EXE project (VB6 by the way), adding a new combobox
onto Form1, setting it's style to 2 - Dropdown List and pasting the following
code into Form_Load:

Combo1.AddItem "Motorbike"
Combo1.AddItem "Car"
Combo1.AddItem "Jeep"
Combo1.AddItem "Van"
Combo1.AddItem "Tank"

Combo1.ListIndex = 0


Whichever item you have selected, pressing Ctrl+Enter causes Jeep to become
selected. I'm using VB6 on Windows 2000 Professional.

I tried it here and it doesn't do a thing.

Have you teid adding the above code to a new prject?



Jan Hyde (VB MVP)

--
Why do people eat pretzels since they are knot food? (Pun of the Day)

.



Relevant Pages