Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Enable and disable buton on form
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00458546
Message ID:
00458559
Vues:
21
>I ahve a form with several command buttons. All are enabled by default. I have one that I disabled in the propeties for the button. I don't quite understand the how to enable the button if say cUseName="RJOHSNON" I did this int the INT Method of the button:
>
>If cUserName="RJOHNSON"
>
>thisform.cmdClose_accounts.enable= .T.
>
>endif

Randall,

If you refer to form's objects, you should use thisform.cmdClose.enabled property, e.g. don't strip thisform part.

You can also use this syntax:
with thisform
    .cmdClose.Enabled=.t.
    .grdMyAccounts.ReadOnly=.f.
    .cmdExit.enabled=.f.
    etc.
endwith
This syntax makes sense, if you want to work with several form objects...

>
>I get an error for this code. I even tried OBJECT.ENABLE= .T. Still I get an error. I still don't quite understand using this type of command. A little help please.
>
>Thanks for your help and Happy New Year!
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform