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:
00394927
Views:
10
Jim,

That sounds like good design, making each control responsible for its own status. What I typically do in the form's refresh method is just loop through the controls collection and set the status for each control. This doesn't really take a pile of code, just a FOR loop and an IF... ELSE statement. It seems easier to type the code in one place than in several places. In fact, in my framework the generic form refresh code is part of the class definition for that type of form, so I don't even have to think about it. However, I recognize that this may not be the best OOP design. Do you see any particular problems with this approach?


>Rick,
>
>It may be a better idea to put the code in teh command button's refresh and not the form's. That way each commadn button's refresh would be;
>
>This.Enabled = (codnition for enabled)
>
>and whenever the form's refresh is called the buttons refreshes will also be executed. Now each button is repsonisble for its own enabled status and there isn't a pile of code in the form's refresh.
Rick Borup, MCSD

recursion (rE-kur'-shun) n.
  see recursion.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform