Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP5 and _CUROBJ
Message
From
26/11/1998 17:36:50
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00161344
Message ID:
00161864
Views:
40
>Try the following
>
>lnNextControl = THIS.TabIndex+1
>IF THISFORM.ControlCount > lnNextControl
> THISFORM.CONTROLS(lnNextControl).SETFOCUS
>ENDIF
>
>You could also make it more sophisticated by checking to ensure that
>THISFORM.CONTROLS(lnNextControl).BASECALASS <> "LABEL" and also <>"CONTAINER" .. etc

Wouldn't work, because the form.controls[] array lists controls in design order, not the tabindex order; so, this will set focus to the control which was next added to the form at design time, and probably not to the next one in tabindex order. Parsing the .controls[] array for the first control with a greater tabindex is also not good, because some of the controls which were first added, may have been moved to be far later in the tabindex.

If this array is to be used, we should look for the control with the tabindex equal to current plus one.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform