Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Prevent properties to change runtime
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00431351
Message ID:
00431352
Views:
8
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform