ID: Q110914
2.5x 2.6x WINDOWS kbui kbfixlist kbbuglist
The information in this article applies to:
When 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.
Microsoft 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.
An 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 fixlist3.00 buglist2.50 buglist2.50a buglist2.50b buglist2.60 buglist2.60a KBCategory: kbui kbfixlist kbbuglist KBSubcategory: FxtoolSbuilder
Keywords : FxtoolSbuilder kbbuglist kbfixlist
Version : 2.5x 2.6x
Platform : WINDOWS
Solution Type : kbfix
Last Reviewed: October 22, 1997