PRB: UP/DOWN Arrow Keys Call Click Event in FormID: Q127005 3.00 WINDOWS kbprg kbprb The information in this article applies to:
SYMPTOMSPressing the UP or DOWN arrow in a list box triggers the Click event.
CAUSEThis behavior is by design. When the arrow keys are pressed to navigate through a list, the value associated with the list is modified. This triggers the Click event.
WORKAROUNDIf you do not want to execute the code in the Click event handler, you can verify the value of the last keypress when the Click event is triggered. If the LASTKEY() function returns the value of the UP or DOWN arrow keys, issue a RETURN in your routine.
MORE INFORMATIONThe Click event handler routine is also executed in the following scenarios: - When the Spacebar is pressed on a command button, check box, or option - When the Enter key is pressed on a command button, check box, text box,
Steps to Reproduce BehaviorThe following code will demonstrate that the Click event is triggered when the UP or DOWN arrows are pressed in a list box. It also illustrates the alternative of verifying the value of the last key pressed.
Additional reference words: VFoxWin 3.00
KBCategory: kbprg kbprb
KBSubcategory: FxprgBrowse
|
Last Reviewed: May 1, 1996 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |