Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refresh method
Message
 
À
06/03/2001 10:54:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Titre:
Divers
Thread ID:
00482006
Message ID:
00482394
Vues:
7
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform