Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing property of Class
Message
De
08/09/2001 14:30:46
 
 
À
08/09/2001 08:32:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00554263
Message ID:
00554308
Vues:
9
I know how to change property value of Form, but I want to change the property of class, so that any Form created from some Class inherit the same property value.


>I'm not sure I fully understand your problem, but have you tried:
>
>ThisForm.MyAddedProperty = new_value
>
>"This" refers to the actual object attached to the method invoked. So if you are in the Click() method of MyButton1, then "This" refers to MyButton1.
>If you happen to be in a Form-related method (like Refresh() for example), then "This" will refer to the form.
>
>"ThisForm" is a 'short-hand' way to refer to the Form that contains the object whose method you are now in. Assuming that your Form has a Name Property of MyForm1 then you could use "MyForm1.MyAddedProperty = new_value" instead. But you can guess that this is not very helpful in the long run because that line is now forever tied to the SPECIFIC name MyForm1. By using ThisForm the code can handle ANY form that it is executing against.
>
>Good luck,
>
>JimN
>>How can I change property (my added) of class from form of that class from some method?
>>I have tried with command THIS but I didn't work (also I need explain of that command).
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform