Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Working with the collection class
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01017111
Message ID:
01017144
Views:
24
>>Hi everybody,
>>
>>I'm not sure, how can I add items to the collection based on their TabOrder in the form.
>>
>
>Nadya,
>
>Not sure if I understood you, but instead of adding the items based in their TabOrder in the form, you can order the collection, something like this:
>
>Add a command button and put in the click()
>
>
>loTabObjects	= Createobject('Collection')
>
>with loTabObjects as Collection
>	for each loObject in thisform.Objects
>		if Pemstatus(Evaluate("thisform." + loObject.Name), 'TabIndex', 5)
>			.add(loObject, Transform(loObject.TabIndex, '@L 999999999_'))
>		endif
>	endfor
>	.KeySort	= 2
>endwith
>
>activate screen
>for each loObject in loTabObjects
>	with loObject
>		? .Name, .TabIndex
>	endwith
>endfor
>
>
>Does this help?


Hugo,

Thanks, but it doesn't suit me. I need to use tcNamedSearch as the key.

I can look at this problem on the different angle, though I think TabOrder idea is better: how can I ensure the correct order of object instantiation?
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