Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Disable/Enable a command button
Message
 
À
07/12/1999 18:41:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00300087
Message ID:
00300105
Vues:
25
If you want to disable the button if a form property ( is "A" and enable it if the form property is "Z", then your code would be:
do case
case thisform.MyProp = "A"
   thisform.cmdMyButton.enabled = .F.
case thisform.MyProp = "Z"
   thisform.cmdMyButton.enabled = .T.
otherwise
   wait window "Must put A or Z into the property"
endcase
This code could go into the refresh method of the form, into the assign method of the property (in VFP6), etc. It could even be a form method that is called from several places.

HTH
Barbara

>Simple question, but giving me a hard time. How do I disable or enable a command button using the THIS or THISFORM command. The command button is in a form and I want to have the button enabled only if the user needs to use the button. In other words, how do I reference the enable/disable options using the THISFORM command. Thanks, Mike.
Barbara Paltiel, Paltiel Inc.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform