PRB: Clicking Disabled Push Button Terminates READID: Q102204 2.5x 2.6x | 2.00 2.5x 2.6x | 2.5x 2.60a WINDOWS | MS-DOS | MACINTOSH kbprg kbprb kbtshoot The information in this article applies to:
SYMPTOMSIf a VALID clause on a GET field disables the following push button and the mouse is used to move to that push button, the READ is terminated. However, if the keyboard is used to move to the push button, the READ is not terminated. CAUSEThe mouse click invokes the VALID clause of the previous object, which attempts to disable the object that has already been clicked. FoxPro handles this condition by terminating the READ. RESOLUTIONNOTE: This behavior does not occur in Visual FoxPro. For the READ not to be terminated, add the following command to the VALID clause of the GET field: RETURN 1 After the cursor moves to the field following the disabled field, you will see that the cursor is positioned just to the right of the next field. To correct this problem, add the following line of code to the next field's WHEN clause: KEYBOARD '{HOME}' STATUSThis behavior is by design. MORE INFORMATIONSteps to Reproduce Behavior1. Create a new screen with one GET field. 2. In the VALID clause of the GET field, add the following command: SHOW GET test DISABLE 3. Create a push button with the variable name "test." 4. Add another GET field after the push button. 5. Generate the screen code. 6. Execute the .SPR program. 7. With the mouse, click the push button. The READ will terminate. Additional reference words: FoxMac FoxDos FoxWin 2.50 2.50a 2.50b 2.50c 2.60 2.60a clear close tshoot KBCategory: kbprg kbprb kbtshoot KBSubcategory: FxprgGeneral Keywords : FxprgGeneral Version : 2.5x 2.6x | 2.00 2.5x 2.6x | 2.5 Platform : MACINTOSH MS-DOS WINDOWS |
Last Reviewed: November 18, 1995 |