Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Object default values
Message
 
 
À
01/07/2010 11:07:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01471185
Message ID:
01471195
Vues:
54
>>>Hi
>>>
>>>How do I set a form objects properties back to their default value? The object is based on a class I have created. I want to set the top and left position back to the default position as defined in the class from within my code.
>>>
>>>TIA
>>
>>There is ResetToDefault method that resets properties.
>>
>>
>>
>>thisform.CheckBox.ResetToDefault("Left")
>>
>>I recently wrote a program to reset certain properties of my objects to their default values (to reset them in Design time). This method works both in run-time and you can run it to reset design-time properties as well.
>
>
>Thanks, that works. Is there a way to know what the default value of a property is (vs. the current value) in runtime ? i.e. to know what the ResetToDefault() will do?

One possibility is to instantiate the object in run-time and read all the properties. Sounds like an expensive solution.
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform