Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Disabling and Enabling all controls on Form
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Database:
Visual FoxPro
Divers
Thread ID:
01440952
Message ID:
01440954
Vues:
70
>I have a form that has a PageFrame and several pages on the PageFrame.
>
>What I'd like to do is to protect the existing data and upon INIT of the form, disable all pages of the pageframe, including all of the textbox controls, dropdown boxes, checkboxes, etc. Then, after the user clicks on the EDIT button, I'd like to enable all pages of the PageFrame and all of the controls therein.
>
>What is the best way to do this? I've heard of enabling through a FOR loop, I think, sort of like rolling through a collection.

Look at SetAll method, e.g.

thisform.pgMyPageFrame.SetAll('Enabled',.f.)

If you want to disable only certain classes, then you would need to write such statement for each class you use in your pageframe (for textboxes, comboboxes, etc.)
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform