Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing a property at runtime
Message
De
13/11/2004 11:26:18
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
13/11/2004 10:59:37
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:
00961161
Vues:
26
>I see it should be done at design time. I will have to change all my forms and controls that reffers to commands properties. What if a control, p.e. a checkbox, has something like this:
Thisform.Command1.Visible = This.Value
??. I will have to change this code, won't I?. It is desirable just to add the image class at runtime without making any changes to the existing code

Sorry, I think that in my previous reply, I misunderstood your example.

Of course you will have to change it, if you want the CommandButton to appear in different places. But it is better to have the possibility to use a variable location. Even if you could change an object's name (which you can't, AFAIK), what about containership? I mean, the object can appear in different places. I guess that if an object is within a Container, added from a class, you want to keep it there!

So yes, you will have to change some code to change from an object with a fixed name, to an object whose name - and containership hierarchy - might change. It should be relatively fast to do these changes, with search and replace.
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