Microsoft KB Archive/136310

= How to Expand a Combo Box Programmatically =

Article ID: 136310

Article Last Modified on 8/24/1999

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition

-



This article was previously published under Q136310



SUMMARY
This article demonstrates how to expand a combo box programmatically. This may be useful when a user presses the TAB key to move into the combo box or when a command button Click event procedure gives the focus to the combo box. It is assumed that you have a combo box on a form and are looking for ways to activate it programmatically.



MORE INFORMATION
Following are two methods for expanding a combo box programmatically:

Method One: Using Pixel Coordinates
Place the following code in the GotFocus method of the combo box: tCol=THISFORM.Combo1.Left + THISFORM.Combo1.Width - 4 tRow=THISFORM.Combo1.Top + 2 MOUSE CLICK AT tRow, tCol PIXELS WINDOW (THISFORM.Name) The combo box expands every time it receives the focus.

Method Two: Using Keyboard Buffer
Place the following code in the GotFocus method of the combo box: KEYBOARD '{ALT+DnArrow}' The combo box expands every time it receives the focus.

Additional query words: VFoxWin drop down dropdown list

Keywords: kbcode KB136310

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.