PRB: Arrow Key Inconsistency in List Boxes

Last reviewed: January 8, 1996
Article ID: Q141908
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, versions 3.0 and 3.0b

SYMPTOMS

After creating a list box, you notice that its behavior is inconsistent when scrolling through the records by using the arrow keys.

WORKAROUND

Place the following code in List2.Keypress to stop the arrow keys from moving beyond the top and bottom:

LPARAMETERS nKeyCode, nShiftAltCtrl if (this.listindex=this.listcount and nKeyCode=24) or;

   (this.listindex=1 and nKeyCode=5)
    nodefault
ENDIF

STATUS

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

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a form, and place two list boxes (List1 and List2) on it.

  2. Populate List1 with more items than are displayable so that the scroll bar is available.

  3. Populate List2 with only a couple of items so that the scrollbar is not active.

  4. Scroll through both the list boxes by using the arrow keys.

  5. Notice that in the second list box, you can continuously scroll up past the first list item to the bottom of the list and down past the end of the list to the top. In List1 the scrolling stops at the top and the bottom of the list.


Additional reference words: 3.00 3.00b VFoxWin
KBCategory: kbtool kbprb
KBSubcategory: FxtoolFormdes


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 8, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.