Information générale
Catégorie:
Codage, syntaxe et commandes
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement