Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Collections and Objects / controls
Message
De
29/10/2004 05:21:17
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Divers
Thread ID:
00955594
Message ID:
00955710
Vues:
12
David,

Thank you - this is so elegant in all it's simplicity. I'm truly grateful.

BR

Peter

>Peter,
>
>This is a good place to use a recursive function.
>
>
>DrillIt( thisform, " ) && call it
>
>
>And here's the function:
>
>
>function DrillIt( roObject, lcName )
>
>if ( pemstatus( roObject, "Caption", 5 ) )
>   if ( ! empty( roObject.Caption ) )
>      debugout lcName + iif( empty( lcName ), "", "." ) + roObject.Name + ".Caption = " + roObject.Caption
>   endif
>endif
>
>if ( pemstatus( roObject, "Objects", 5 ) )
>   local loObject
>
>   for each loObject in roObject.Objects
>      DrillIt( loObject, lcName + iif( empty( lcName ), "", "." ) + roObject.Name )
>   endfor
>endif
>
>return
>
>
>
>>I'm trying to find all objects and all objects / controls within other objects (container type controls like Pages on pageframes and Headers in Grids) on a given form, provided they have a Caption property.
>>
>>If I find one, and the Caption <> "", I'd like to write the full hierachy to a file. That's the part I know how to do.
>>
>>So far I've come up with the following, which gives me part of what I want, but for some reason skips the grids.
Peter Pirker


Whosoever shall not fall by the sword or by famine, shall fall by pestilence, so why bother shaving?

(Woody Allen)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform