The information in this article applies to:
- Microsoft FoxPro for Windows, versions 2.5 and 2.5a
- Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, and 2.5a
To place the cursor on a specific push button when you are leaving a GET
field, you must use the command _CUROBJ. For example:
- Using the FoxPro Screen Generator, create a screen that has one GET
field and four push buttons. Call the push button variable "action".
Call the push button prompts "Next", "Prior", "Save", and "Cancel".
- To move from the GET field to the push button labeled "Save" with one
keystroke and without using the mouse, the GET field must contain a
VALID clause. In this case, the VALID clause of the GET field will read:
_CUROBJ=action+3
This will place the cursor on the push button labeled "Save".
NOTE: When a push button is selected, the value of action (the push
button variable) changes. In order to have the cursor placed on the same
push button every time after you leave the same GET field, place the
following code in the push button VALID clause:
action = 1
This resets the variable to the first push button so that the cursor
will be placed on the correct push button every time.
|