Using _CUROBJ with Push Buttons

ID: Q96356

2.50 2.50a | 2.00 2.50 2.50a

WINDOWS         | MS-DOS
kbprg

The information in this article applies to:

To place the cursor on a specific push button when you are leaving a GET field, you must use the command _CUROBJ. For example:

1. 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".

2. 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.

Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a KBCategory: kbprg KBSubcategory: FxprgGeneral
Keywords          : FxprgGeneral 
Version           : 2.50 2.50a | 2.00 2.50 2.50a
Platform          : MS-DOS WINDOWS

Last Reviewed: April 30, 1996