Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Object Reference
Message
From
27/12/2007 16:49:12
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
27/12/2007 16:41:56
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01277566
Message ID:
01277959
Views:
25
>>For the purposes of the FAQ, I want to have a collection/array of objects that are visible on the form (e.g., a group of related CheckBoxes, TextBoxes, etc.), and which can be accessed through an index or key.
>>
>>Perhaps Collections work, but I'll have to do some testing first, and produce some sample code specifically for this need.
>>
>>Thanks for the information.
>
>If it's a collection of objects on the form, sys(1272) returns a useful key, but the first word in the chain is the name of the form's class, not that of the form itself, as long as the form's .init() hasn't finished running. Once it has, it's thisform.name. So probably the best key for any control is sys(1272) with the first word replaced with "thisform" or "". You'll have to recurse, of course.

OK, I'll check about keys later. The other question is, if I add a CheckBox to a Collection, how do I make it show on the form? Or is it the other way round - first AddObject() on the form, and then add it to the Collection?

I don't want to get all objects on the form; only have an array/collection of some specific objects which I want to access later, as an array/collection.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform