Creating Hot Keys for Objects Other Than Push ButtonsID: Q114185 2.5x 2.6x | 2.5x 2.6x | 2.5x 2.6x kbtool kbprg
The information in this article applies to:
SUMMARYIn the Screen Builder, hot keys (also known as access keys) can be assigned to push buttons. However, the Screen Builder does not provide a built-in process for assigning hot keys to other screen GET objects, such as fields, popups, list boxes, and so on. The information below describes how to create hot keys for GET objects other than push buttons by using the ON KEY LABEL statement, the _CUROBJ system variable, and the OBJNUM() function. NOTE: In Visual FoxPro for Windows, use the ActiveControl form property instead of _CUROBJ and OBJNUM().
MORE INFORMATION
Overview1. Use the Line Drawing tool to simulate the underline of a character (the 2. In the SETUP snippet of the screen, place an ON KEY LABEL <ALT+key>
3. Place a POP KEY command in the CLEANUP code of screen to clear the ON
NOTESIf you are using memory variables in conjunction with SCATTER and GATHER commands in the GET fields, remember to include the "m." (without the quotation marks) alias with the field names. The POP KEY command clears all ON KEY LABEL settings. If you are using F1 for help, add another ON KEY LABEL command to reassign the F1 key. Similarly, restore any other needed ON KEY LABEL statements needed. (Alternatively, investigate using the PUSH KEY command in the SETUP snippet to store the original ON KEY LABEL assignments).
Example Using <Foxpro_Directory>\TUTORIAL\CUSTOMER.DBF
10. In the Setup snippet window, type the following:
11. Close the Setup snippet window, saving changes.
12. In the Cleanup snippet window, type the following:
13. Close the Setup snippet window, saving changes.
14. From the Program menu, choose Generate. 15. When prompted to save changes to the screen, choose Yes. 16. When prompted to save environment information, choose Yes. 17. In the Generate Screen dialog box, choose Generate. 18. Close the Screen Design window. 19. In the Command window, type "DO test.spr" (without the quotation Press ALT+O. Note that this selects the COMPANY GET field. Now press
ALT+C. This selects the CNO GET field.
For additional information on creating hot keys in Visual FoxPro, please see the following article(s) in the Microsoft Knowledge Base:
Additional reference words: FoxMac FoxDos FoxWin 2.50 2.50a 2.50b 2.50c
2.60 2.60a hotkey hotkeys short cut shortcut
KBCategory: kbtool kbprg
KBSubcategory: FxtoolSbuilder
|
|
Last Reviewed: May 1, 1996 © 1999 Microsoft Corporation. All rights reserved. Terms of Use. |