Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Prevent properties to change runtime
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00431351
Message ID:
00431352
Vues:
9
>Hi all,
>
>How can I prefent properties like enabled, backcolor and font to change at runtime?
>When my object is created and my first parameter is TRUE, I want to disable the oppertunity one of the properties can be changed.
>
>Thanks in advance,
>
>Sander


Sander,

Are you using VFP 6?

In that case you can use the Assign method of the properties specified.
In the init set a home made property of the object to .t. indicating that the other properties are disabled.
in the assign method place code like this:

LParameter tuNewVal && Passed new value
If This.lReadOnlyProperties
MessageBox('Property is Read-Only')
Else
This.myPropertyName = tuNewVal
EndIf
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform