BUG: Returning 1 in Check Box Valid Event Skips Next Object (190261)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 3.0b
  • Microsoft Visual FoxPro for Windows 5.0
  • Microsoft Visual FoxPro for Windows 5.0a
  • Microsoft Visual FoxPro for Windows 6.0

This article was previously published under Q190261

SYMPTOMS

Pressing the ENTER key while on a check box that returns one (1) from its Valid event, causes Visual FoxPro to skip the next object in the tab order. Pressing the Spacebar while on the same check box moves the cursor to the proper object in the tab order.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a program that contains the following code and run the program:
          o=CREATEOBJECT('Ztest')
          o.SHOW()
    
          DEFINE CLASS Ztest AS FORM
             WINDOWTYPE=1
             ADD OBJECT chk1 AS CHECKBOX WITH TOP=5,LEFT=5,CAPTION='PPP'
     
             FUNCTION chk1.VALID()
                RETURN 1
             ENDFUNC
          ADD OBJECT txt1 AS TEXTBOX WITH ;
             TOP=35,LEFT=5,WIDTH=50,cVar='thisform.t1'
          ADD OBJECT txt2 AS TEXTBOX WITH ;
             TOP=65,LEFT=5,WIDTH=50,cVar='thisform.t1'
          ENDDEFINE
    						
  2. When the form appears, press the Spacebar and note that the focus moves to the first text box. Press the TAB key twice to move back to the check box.
  3. Once you are back on the check box, press the ENTER key and note that the focus goes directly to the second text box. The first text box never gets focus.

Modification Type:MajorLast Reviewed:5/12/2003
Keywords:kbbug kbnofix KB190261