Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Disable/Enable a command button
Message
De
07/12/1999 18:58:50
 
 
À
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:
00300110
Vues:
24
>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.

The way I usually do it is the REFRESH method of the button itself, i.e. THIS.ENABLED=IIF(THISFORM.MyProperty=.T.,.T.,.F.)

Now call MyButton.Refresh when Myproperty changes.

Same thing could be achieved with

LPARAMETERS SetActive
THIS.ENABLED=IIF(SetActiveOnOff,.T.,.F.)

Call with THISFORM.MyButton.Refresh(.T.) or (.F.), as it were.

Hope this did it, write back otherwise.

Peter
Peter Pirker


Whosoever shall not fall by the sword or by famine, shall fall by pestilence, so why bother shaving?

(Woody Allen)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform