Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inheritance Pages in Page Frame
Message
From
30/12/2000 16:27:23
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00458076
Message ID:
00458142
Views:
16
>I have a form class with page frame and two pages in it.
>
>Now I have derived a subclass of the above and have added two more pages to the page frame.
>
>The two new pages do not have the same properties set for the first two namely activate event should refresh the page.
>
>Any way I can make the two new pages inherit from the first two pages.
>
>Regards
>Bhavbhuti


Create a pageframe class with more pages than you think you'll ever need...say 20. Add the property nPageCount. THen in the init of the pageframe, add the following code:

LOCAL lnPageCount, lcPage

WITH This
FOR lnPageCount = .nPageCount + 1 TO .PageCount
lcPage = "Page" + ALLTRIM(STR(lnPageCount))
.RemoveObject(lcPage)
ENDFOR
ENDWITH


Now, when you design your form, set the value of PageFrame.nPageCount to the number of pages you are acutally using.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Reply
Map
View

Click here to load this message in the networking platform