>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