Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refresh method
Message
 
To
06/03/2001 10:54:38
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Miscellaneous
Thread ID:
00482006
Message ID:
00482394
Views:
8
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform