FIX: Numeric Hot Keys Not Working with Push ButtonsLast reviewed: October 20, 1997Article ID: Q110914 |
2.5x 2.6x
WINDOWS
kbui kbfixlist kbbuglist
The information in this article applies to:
SYMPTOMSWhen you are using hot keys (also known as access keys) for push buttons in FoxPro for Windows, the hot keys appear as underlined letters in the push button prompt. If KEYCOMP is set to WINDOWS, pressing ALT+<underlined letter> from a GET input field, a text editing region, a popup, or a list in the screen selects the push button. However, if the hot key is defined as a numeral (1-9) instead of as a character (A-Z), pressing ALT+<number> does not select the push button.
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Visual FoxPro 3.0 for Windows.
RESOLUTIONAn alternative to using hot keys is to define ON KEY LABEL routines. The following example uses two alternatives to call the myvalid routine. The myvalid routine can be called from the ON KEY LABEL assignment or when a choice is made in the push button.
SET KEYCOMP TO WINDOWS ON KEY LABEL alt+2 DO myvalid @ 3,4 GET mpush PICTURE "@* \<2test;\<Test" VALID myvalid() DEFAULT 1 READ PROCEDURE myvalid WAIT WINDOW "in the valid"You can also use this method in the Screen Builder. Define the ON KEY LABEL command in the Setup code of the screen, and define the myvalid routine in the Cleanup and Procedures code of the screen. When you are defining the push button, choose the Valid button. In the Valid dialog box, select the Expression button, and then type "myvalid()" (without the quotation marks) in the box.
|
Additional reference words: VFoxWin FoxWin 2.50 2.50a 2.50b 2.60 2.60a
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |