Page is the only visual class that doesn't support Visible property.
This prevents from using this.parent.visible inside the various classes,
but it force to use IIF (...., this.parent.parent....,)
Horrible.
Well (rather badly), since a page is visible if and only if the pageframe is visible,
the solution to harmonize the all consists of adding Visible to the page,
and to RETURN this.Parent.Visible in Visible_Access.
Simple. grrr VFP collapses immediately
I remind me that a member of the team has said that the resources of the Team
they have not been enough to be able to add a true Visible to the Page,
but at least given me the possibility to add Visible_Access
(better if you add a Page.Visible readonly property that does this).
repro:
PUBLIC oform1
oform1=NEWOBJECT("form1")
oform1.Show
RETURN
DEFINE CLASS form1 AS form
ADD OBJECT pageframe1 AS pageframe WITH ;
MemberClass = "mypage", ;
MemberClassLibrary = SYS(16) ,;
PageCount = 2
ENDDEFINE
DEFINE CLASS myPage AS Page
Visible = .T.
PROCEDURE visible_Access
ENDDEFINE
PS. Please, someone doesn't come to write that Visible is a reserved word. I know this.