Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pageframe baseclass.
Message
De
03/06/1997 10:37:06
 
 
À
03/06/1997 09:57:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00034549
Message ID:
00034718
Vues:
33
>>>I am just noticing trouble when I try to create instances of my base pageframe class. Specifically, how do I deal with pagecount? For instances using fewer pages than the base, the extra (blank) pages appear on the right of page frames using fewer pages than are on the base frame.. Attempting to remove them by reducing the pagecount produces an error because the pages are members of a parent class. Reducing the number of pages in the base class to 1 to make sure that all instances have more, produces funny errors when I attempt to load the form. How do you deal with this?
>>
>>Why you are setting the number of pages to 1, why not 2 ?
>>can you tell the errors you're getting when loading the form.
>
>Come to think of it, I could have set the base class to 2, but I didn't wan to rule out the strange possibility that someday, for whatever reason, I would want a pageframe with one page. This fact is arbitrary however, because I still would get errors when trying to instantiate a control with more than 2 pages. What kind of errors? Well it was something having to do with a grid on the third page of the pageframe having a reference to a parent that was invalid. It was because the pageframe's class was only supposed to have 2 pages. As far as I can see, Arnon's suggestion of using addobject() is the only viable solution. This seems silly to me, but as of yet I see no wa around it.


I put 10 pages in my baseclass, then REMOVEOBJECT for the pages I don't use. I've found this easier to handle than adding new pages at run time.

Craig
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform