Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to remove a page from a PF at design time
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01352266
Message ID:
01352317
Views:
28
Jim,

This is a prime example of early composition. You are creating a pageframe class that has multiple pages and then you want to use an instance with less pages. You need to rework your class design so you have a pageframe class that has one page and the proper settings to use your page class for newly added pages. Then subclass this class to add more pages. This way you won't ever have to try to use the 11 page pageframe to get 9 pages, you can use the 9 page pageframe class to get 9 pages, or you can use the one page class and set the page count to 9 and add your controls.

Thinking in purely object oriented terms you are taking a class definition for a pageframe with 11 pages and then saying that you only want 9 of them, well that is saying that you don't want the 11 page pageframe class and therefre the 11 page pageframe is the wrong class to use for your purposes.

This is purely a class design problem where you have composed (assembled the parts) of your class too early and have found yourself needing to take the class apart to get what you really need.

JimB
Previous
Reply
Map
View

Click here to load this message in the networking platform