Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Object.Enable
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00394572
Message ID:
00395020
Views:
13
Rick,

The one problem that I have had with the form approach is when you want one textbox or control to be enabled/disabled the opposite of all of the others (like a searching control enabled when not editing and disabled when editing). With the control approach the behavior is coded into the control class definition and you just choose the appropriate control class for the job.

My txtBase class has a property named editable whihc is logical and this code in the Refresh method;
IF This.Editable
   This.Enabled = Thisform.Editing
ENDIF
This way if I want one textbox to NOT be switched then I just set its Editable property to .F. in the property sheet.

I also have a txtSearch class that has the opposite logic in the Refresh, but it still honors the editable property.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform