Microsoft KB Archive/141637

= PRB: Listbox Does Not Automatically Display Correct Row =

Article ID: 141637

Article Last Modified on 9/30/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition

-



This article was previously published under Q141637



SYMPTOMS
The list box does not initially highlight the correct row until it has received the focus. The list box is always scrolled to the top of the list.



WORKAROUND
Inside the list box Init event, type this code: THIS.REQUERY



STATUS
Microsoft is researching this behavior and will post new information here in the Microsoft Knowledge Base as it becomes available.



Steps to Reproduce Behavior
 Create a new form.  Add the following tables to the Data Environment: Customer  (Located in VFP/SAMPLES/DATA/) Orders    (Located in VFP/SAMPLES/DATA/) NOTE: The tables should not be related.  Add a text box to the form. The text box should prevent the list box from receiving the focus when the form is run.  Add a list box to the form, and change the following properties: ColumnCount   =  2 ColumnWidth   =  0,100 ControlSource =  ORDERS.CUST_ID RowSource     =  CUSTOMER.CUST_ID,CONTACT RowSourceType =  FIELDS  Run the form. Note that the list box is scrolled to the top and no row is highlighted. If you press the TAB key to move to the list box, the correct row is highlighted.</ol>

Additional query words: VFoxWin

Keywords: KB141637

-

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

© Microsoft Corporation. All rights reserved.