Hi bhavbhuti,
>I have a form with a Pageframe and 10 pages on it. These 10 pages are not required for all the records. I would like to hide the unrequired pages for a given record, when the user shifts to the next records another set of pages will unhide themselves and hide some other.
>
>I could not find a visible property for a page (VFP6SP5) and I do not want to remove it as the next record may require it.
The most easy solution is to put everything on the page in a class and add and remove the page at runtime.
I have not checked the following, but I think it should work for adding a page. Removing the page of course if much simpler.
THISFORM.LockScreen=.T.
WITH THISFORM.MyPageFrame
.PageCount = .pagecount+1
WITH .Pages(.Pagecount)
.Caption="My page caption"
.PageOrder = nPagePostition
.AddObject("Cnt_custom","MyPageContentsClass")
.Cnt_custom.Visible = .T.
ENDWITH
ENDWIDTH
THISFORM.LockScreen =.F.
You might have a THIS.Refresh in the UiEnable event of the container to refresh the contents when the page is selected.
Good luck,
Walter,