Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Disabling selected objects for later restore
Message
De
06/09/2006 11:00:30
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01151156
Message ID:
01151347
Vues:
43
Rex,

Setting enabled=.f. should grey out the command button. Are you sure the bindevent() was working? My framework uses this technique to show if any data has changed or not. I enable/disable save and cancel buttons so the user can tell if data has changed.


>Hi James,
>
>Dopey me! I definitely DO have all my objects subclassed however I have not previously created a custom method of a subclassed object. By looking harder, I found it in the menu.
>
>Anyway, I added the code but the buttons whilst technically disabled (that is, they do NOT function whilst the child form is open and has focus) the buttons still 'appear' enabled.
>
>The bottom line is I didn't really explain what I wanted in full. I need to grey out the buttons so that not only are they disabled, they appear disabled. I hope I have now explained the problem.
>
>Are you aware of a code snippet that loops through the objects (in this case buttons) and saves their
enabled state to an array so that they can be bulk disabled -
Here is the code that I think you are talking aobut.
for each loObj in thisform 
  if loObj.baseclass = "Commandbutton"
      loObj.enable = .f.
  endif 
next 
If you have command buttons in containers you will have to drill into them as well.

>
>.SetAll("ecommand",.F.,"Enabled")
>
>then returned to their proper state once the child form is closed?
>
>Regards..Rex
>
>Vale...Steve Irwin!!!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform