ComboBox behavior

2 questions regarding a comboBox.

1.  Is it poosible to have it initiated in the drop down position. ie. As if the drop down arrow was clicked.

2.  Can I make the drop down section respond to the mouse wheel. The combobox itself responds to the wheel. It's the dropdown section that does not. I looked in the mouse wheel method and found this.

                      LPARAMETERS nDirection, nShift, nXCoord, nYCoord

But am not sure what to do /

Thanks.
Michael
MichaelKatzAsked:
Who is Participating?
 
pcelbaCommented:
1. Yes, this is possible. Place the following code into the form's Init or other suitable method:
THISFORM.YourComboName.SetFocus
KEYBOARD '{F4}'

Open in new window


2. Mouse wheel works when the mouse cursor is not placed on the highlited row which is not always possible: When you activate the combo by F4 key in form's Init then the dropdown section reacts to the mouse wheel. If you activate it by pressing the down arrow then the highlited row follows the mouse cursor and mouse wheel is "inactive". If you leave the mouse cursor on the down arrow then the mouse wheel works and it even allows to scroll from the last item in the drop down to the first one.

This behavior may change in different VFP versions. Mine is Visual FoxPro 09.00.0000.7423 for Windows.

0
 
MichaelKatzAuthor Commented:

Thanks.
Both solutions were exactly what I was looking for.
0
 
MichaelKatzAuthor Commented:
This was the quickest and response I ever received. AND, it was right on target.
0
 
pcelbaCommented:
It was easy to answer because you know how to ask.

The answer could be even faster but I am watching TV this evening... :-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.