Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Procedural Code
Message
De
30/10/1998 12:24:54
Ian Matthews
Up & Running Technologies Inc
Chestermere, Alberta, Canada
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Procedural Code
Divers
Thread ID:
00152898
Message ID:
00152898
Vues:
49
I can not find a place to put procedure code that will allow me to modify a form. Specifically if a simple test is .t. then I want several fields on a form to be disabled.

All of my other PROCEDUREs are stored in my main program. However if, in my main program, I put PROCEDURE code that changes a the ENABLED property of a field, I get one of two errors:

1: if I use THISFORM.FIRST_NAME.ENABLED=.f., VFP informs me that THISFORM can only be used in a form, not a program, or;

2: if I use the name of the form CONTACTS.FIRST_NAME.ENABLED=.f. VFP informs me it can not find the object CONTACTS.

This code is specific to one form so I thought I would try to put the code in the INIT method of the form but VFP informs me that METHODS AND EVENTS CAN NOT CONTAIN NESTED PROCEDURALS. I am fairly certain that this is where I put PROCEDURE code using FP2.6 but apparently it has changed.

Where can I put reusable code that makes changes to a fields properties on a form?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform