Dean,
All of my interface objects have a property named lEditable and my refresh code is;
IF This.lEditable
This.Enabled = Thisform.Editing
ENDIF
My form class's editing property is set for both adding and editing so it works for both. If I need a component that behaves differently I just set the lEditable property to .F. and set the enabled property as I need it.
JimB
>Hi Jim.
>How would you handle objects that should be alway enabled? Would you put an "*" in the refresh method so it will never be DISABLED or would you create another object that will always be ENABLED?
>
>Thank you so much.
>
>>Dean,
>
>>That is how I do it. I believe that each object should be responsible for its own enabling/disabling. I would abbreviate the code to;
>
>
>>This.Enabled = THISFORM.Add_mode OR THISFORM.Edit_mode
>
>>As this is functionally the same as your code but is one line with no IF involved.