Hi David,
>The Objects[] and Controls[] collections will only ever have contained objects in them, those dropped onto the form at design time, or created at runtime via AddObject() method calls.
>Any object that is created via CreateObject() or NewObject() and assigned by reference to an object property are not "contained" by the object so they will not be in the Objects[] collection. You can use amembers() to get to these kind of objects.
Thanks for your reply! For the purpose I wanted to use the objects collection, the contained objects are enough.
Just wanted to get around the different coding for each container class which has a collection that holds references to it's contained objects. Just wanted to replace all the IF .BaseClass == "Pageframe" then use Pages, IF .BaseClass == "Grid" use Columns, etc.
I'm using Objects now and didn't experience anything bad so far. Do you think there is any disadvantage using the Objects collection for this? When I wrote the original message I was wondering, if there might be other differences to the "original" collections, since the order in which the references are stored are not the same. That made me think, that Objects was designed for a different purpose than the other collections and it's not execatly the same internally.
Thanks,
Armin