>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