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.
MORE INFORMATION
Step-by-Step Procedure
- Choose Open from the File menu and open the CUSTOMER table in the
TUTORIAL directory.
- In the Command window, type:
CREATE SCREEN test
- Once in the Screen Builder, choose Quick screen from the Screen menu.
Press the OK push button to accept the defaults.
- Create a PUSH BUTTON set with the following prompts:
Top
Prior
Next
Bottom
Quit
- Choose ACT for the variable.
- In the WHEN clause for the PUSH BUTTON set, type:
SET KEYCOMP to MAC
- 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
- In the screen's SETUP code, type:
SET KEYCOMP TO WINDOWS
- 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.
|