Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can we find object by name
Message
 
 
À
26/07/2005 12:21:31
Jim Winter
Jim Winter Consulting
Hinesburg, Vermont, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01035941
Message ID:
01035960
Vues:
11
>>Hi everybody,
>>
>>If I know the object's name (the object is on the form, like grid), but don't know its hierarchy, is there a way to receive an object reference?
>>
>>Thanks a lot in advance.
>
>Hi Nadya,
>
>Would something like this do the trick?
>
>cName = yourobjectsname
>FOR i = 1 TO ThisForm.Objects.Count
>   IF ThisForm.Objects(i).Name = m.cName
>      * You have the reference - do what you want with it.
>   ENDIF
>ENDFOR
>
>Regards,

Yes, I was thinking about something like that. but it's going to become tricky, if you have pageframes or containers. So, I scratched the idea and decided to use the full reference.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform