Microsoft KB Archive/124632

{| = How to Have Macintosh Behavior in Push Buttons Only =
 * width="100%"|

ID: Q124632

2.60a MACINTOSH

The information in this article applies to:


 * Microsoft FoxPro for Macintosh, version 2.6a

SUMMARY
This article shows by example how to set up an application so that a user can press TAB and ENTER to move between GETs in a screen and not move between PUSH BUTTON GETs in the same screen.

To accomplish this task, place code in the WHEN clause of the PUSH BUTTONs to reset KEYCOMP.

Step-by-Step Procedure
1. Choose Open from the File menu and open the CUSTOMER table in the

TUTORIAL directory. 2. In the Command window, type: CREATE SCREEN test 3. Once in the Screen Builder, choose Quick screen from the Screen menu. Press the OK push button to accept the defaults. 4. Create a PUSH BUTTON set with the following prompts: Top Prior Next Bottom Quit 5. Choose ACT for the variable. 6. In the WHEN clause for the PUSH BUTTON set, type:

SET KEYCOMP to MAC 7. In the VALID clause for the PUSH BUTTON SET, type: DO CASE CASE act = 1  && TOP GO TOP CASE act = 2  && PRIOR IF BOF GO TOP ELSE SKIP -1 IF BOF GO TOP ENDIF ENDIF CASE act = 3 && NEXT IF EOF GO BOTTOM ELSE SKIP IF EOF GO BOTTOM ENDIF ENDIF CASE act = 4 && BOTTOM GO BOTTOM CASE act = 5 && QUIT CLEAR READ ENDCASE

SHOW GETS SET KEYCOMP to WINDOWS 8. In the screen's SETUP code, type: SET KEYCOMP TO WINDOWS 9. Run the screen. Pressing the TAB or ENTER key will take the user through the CNO, COMPANY, and other fields. Only the mouse will move through the push buttons.

Additional reference words: FoxMac 2.60a KBCategory: KBSubcategory: FxtoolSbuilder

Keywords         : kbcode FxtoolSbuilder Version          : 2.60a Platform         : MACINTOSH
 * }