Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Looping through controls from the middle
Message
 
 
To
05/01/2009 11:33:57
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01371035
Message ID:
01371104
Views:
14
Yes, exactly.

>Something like this?
>
>
>	* Create a cursor starting with tab index greater than current, then back to those less than current
>	ControlTabIndex = 0
>	FOR x = 1 to 2
>		FOR EACH loControl IN THIS.Parent.Parent.CONTROLS
>			ControlTabIndex = loControl.TabIndex
>			IF PEMSTATUS( loControl, 'TabIndex', 5 )
>				IF x = 1
>					* Insert for tab indexes greater than current
>					IF loControl.TabIndex > THIS.TabIndex
>						INSERT INTO SomeCursor...
>					ENDIF
>				ELSE
>					* Insert for tab indexes less than current
>					IF loControl.TabIndex < THIS.TabIndex
>						INSERT INTO SomeCursor...
>					ENDIF
>				ENDIF
>			ENDIF
>		ENDFOR
>	ENDFOR
>
>
>>First you would need to loop through all the controls and populate some other indexed collection / cursor based on the property you're looking at and then do the second loop through the indexed cursor / new collection.
>>
>>>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.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform