Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP5 and _CUROBJ
Message
From
25/11/1998 23:19:34
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00161344
Message ID:
00161699
Views:
38
>Try the following
>
>lnNextControl = THIS.TabIndex+1
>IF THISFORM.ControlCount > lnNextControl
> THISFORM.CONTROLS(lnNextControl).SETFOCUS
>ENDIF

Russel

I was right last time. Tabindex is different from Controls(). Tab index you have control over, CONTROLS() is fixed to the order the objects have been added to the form.

So If Field1.tabindex is 1, Field2.tabindex = 2 but you had already inserted say 2 command buttons with tab index of 3 & 4,

For field1 the tabindex is 1 but the Form.Controls() index is 3. Hence the above method WILL not work without a major re arrangement of the screen and defnitely cannot be used in a class to drop on a form.

Your thoughts on this??

Bernard
Previous
Reply
Map
View

Click here to load this message in the networking platform