Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Prevent a page of a pageframe loading
Message
From
12/11/2002 13:46:05
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00721464
Message ID:
00721749
Views:
10
>Hi all,
>
>Is there some way to prevent the overhead of loading a page of a pageframe other than by adding the objects the first time the page is selected.
>
>I have a pageframe with some 14 pages, some of which are not available if certain modules have not been installed. I would just like to be able to delete the unavailable pages as necessary in the Load event but at that stage the pages don't yet exist, but if I wait till the Init method then the pages and all their objects will have been initialised, so....
>
>Is there some other way of achieving this?

How about building the pageframe with only the pages which are always there, and then conditionally adding the optional pages - until we get vfp8, you can subclass the page class in a .prg, and have it load the container with controls on first activate. Thus, your pageframe loads with the minimal number of pages, .newobject()s the applicable optional pages, and these pages load their content when activated. You'd need one class for loadable pages, and then subclass this for each of the pages you want.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform