PRB: TabIndex Setting Does Not Activate Selected Form First (134312)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
This article was previously published under Q134312 SYMPTOMS
Setting the TabIndex property of a form within a formset changes the
activation order of the forms. However, the first form added to the formset
will always be activated first although its TabIndex property is set to a
value other than one.
The TabIndex property of a form within a formset can be used to determine
the activation order of forms within a formset. By default, the first form
added in a formset is activated first, the second form added is activated
second, and so on. By changing around the TabIndex properties for all the
forms within a formset, the activation order is changed and the form which
has a TabIndex property of 1, is expected to be activated first.
RESOLUTION
By incorporating a few changes in the formset, it is possible to have the
correct form be activated as the first form within a formset. Using the
formset configuration as described below in the "More Information" section,
the following changes correct the behavior.
Steps to Follow to Correct Behavior- Create a new property for the formset called FirstTime.
- In the Init method of the formset, add the following line of code:
FirstTime=.T.
- In the Activate method of Form1 of the formset (Form1 is the first form
added to the formset), add the following lines of code:
IF thisformset.firsttime=.T.
NODEFAULT
ThisFormSet.FirstTime=.F.
ThisFormSet.Form4.Command1.SetFocus
ENDIF
STATUS
Microsoft is researching this behavior and will post new information here
in the Microsoft Knowledge Base as it becomes available.
Modification Type: | Major | Last Reviewed: | 2/15/2000 |
---|
Keywords: | KB134312 |
---|
|