Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing a property at runtime
Message
De
12/11/2004 17:38:11
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
12/11/2004 17:32:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP1
Database:
Visual FoxPro
Divers
Thread ID:
00961048
Message ID:
00961051
Vues:
25
>Hi:
>
>I need to change the Name of a commandbutton into a container at runtime. Pretty straightforward
>
>I made a form, add a Container into it, then a commandbutton into the Container and run a
Thisform.Container1.Command1.Name = "cmdNewName"
. Works fine.
>
>However, if the Container with a commandbutton is a class and I add this class into the form, running the same piece of code
Thisform.Container1.Command1.Name = "cmdNewName"
causes the error : "'Name' is a Read Only property".
>
>Can you explain me why is that? How can I help it?
>
>It's necesary for me to change the Name of the comandbutton

The name is one of the few properties you can't change. Why would you need to change that one?

If you want to add an "array" of objects, with names dynamically assigned, perhaps one of the methods explained in FAQ #8110 can help you.
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)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform