Sorry didn't read your reply before, I was suggesting a similar approach.
>Hey Sebastian,
>
>I would choose a totally different approach < vbg >:
>
>Make the property numeric and call it nEditModeBehaviour. Allow values from 0 to 2 and put the value descriptions in the property description. This would IMO be better to understand. And you can extend to more behaviours in the future. The whole thing seems more like an enumeration to me.
>
>Regards,
>Armin
>
>>Hi, folks!
>>
>>Here is a little "competition" <vbg>:
>>
>>I have a class called "MyButton" with a property "xyz"!
>>
>>In the refresh event I put the following code:
>>
>>PROC Refresh
>>WITH This
>> DO CASE
>> CASE ISNULL(.xyz)
>> * nothing to do
>> CASE .xyz = .T.
>> * set enabled state to the same value of forms editmode
>> .Enabled = ThisForm.lEditMode
>> CASE .xyz = .F.
>> * set enabled state to the opposite value of forms editmode
>> .Enabled = (NOT ThisForm.lEditMode)
>>ENDWITH
>>ENDPROC
>>
>>
>>Now the question: What is a good, proper, correct name of the property "xyz"?