Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Object.Enable
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00394572
Message ID:
00394927
Vues:
9
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform