Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Looping through controls from the middle
Message
De
05/01/2009 12:42:51
 
 
À
05/01/2009 10:50:56
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01371035
Message ID:
01371086
Vues:
21
No idea if this will work but off the top of my head...........

Instead of a FOR EACH loop, can you iterate through the Controls array using a subscript? Something like
FOR i = this.tablindex+1 TO thisform.ControlCount + this.tablidex -1
    DO THE CHECK FOR thisform.controls[MOD(i-1,thisform.controlcount)+1]
ENDFOR
>If the current control is in the middle of the count when looping through the controls, how can I loop through all the controls from that one forward to the end, then start back at the first one and only cycle through to the current control? Did that make any sense? It does to me, but I've been staring at it for awhile. Here is a code block that I'm working with.
>
>
>	* JJ - 01/05/2009 - Account/Patient Issue 101
>	CASE nKeyCode = 9
>		x = 0
>		FOR EACH loControl IN THIS.Parent.Parent.CONTROLS
>			IF PEMSTATUS( loControl, 'TabIndex', 5 )
>				FOR TabIndexLoop = 1 TO THIS.Parent.Parent.ControlCount
>					IF loControl.TabIndex > THIS.Parent.TabIndex
>						loControl.SetFocus
>					ELSE
>						
>					ENDIF
>				ENDFOR
>			ENDIF
>		ENDFOR
>		NODEFAULT
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform