BUG: Focus Changes Even Though Grid Text Box Valid Returns .F.
ID: Q191686
|
The information in this article applies to:
-
Microsoft Visual FoxPro for Windows, versions 3.0, 3.0b, 5.0, 5.0a, 6.0
SYMPTOMS
In a grid, focus leaves the text box control to go to the control you are
clicking even though the Valid method of the text box returns .F. or 0.
However, the focus remains unchanged in the text box control when you are
tabbing out to move to a different control.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article.
MORE INFORMATIONSteps to Reproduce Behavior
- Create a new form, named mytest.
- Add a one column grid to the form and two Command buttons.
- In the Load event of the form, insert the following code:
SET SAFETY OFF
CREATE TABLE xyz (name C(10))
INSERT INTO xyz VALUES ("test")
- In the Valid method of the text box in the grid, place the following
code:
RETURN .F.
- Save and run the form.
After you open the form, click Command button 1. The "Invalid input"
message appears and then the focus shifts from the text box in the grid to
the Command button. At the same time, the grid's text box also has a black
border indicating that it also has focus. At this point, if you press the
Tab key, the focus moves to the other command button. Apparently, the focus
is no longer with the text box even though the Valid method in the text box
is returning false.
Additional query words:
kbVFp600bug kbVFp500abug kbVFp300bbug kbCtrl kbContainer
Keywords :
Version : WINDOWS:3.0,3.0b,5.0,5.0a,6.0
Platform : WINDOWS
Issue type : kbbug
|