Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pageframe baseclass.
Message
De
04/06/1997 10:23:39
 
 
À
03/06/1997 23:18:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00034549
Message ID:
00034953
Vues:
36
>>>>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.
>
>
>You still can set the number of pages to 2, and in the form set TABS property of the pageframe to .f.
>I created 3 pageframe classes, 2 pages, 5 pages and 10 pages. I added a property "OriginalNumber" to the classes, in the init event of the classes I added the following : "this.pagecount = this.OriginalNumber"
>
>In the form level if you add a pageframe with 10 pages and you only need 8 pages set "OriginalNumber" property to 8.
>At design time you can see all 10 pages, but at run time you wil see only 8 pages.
>
>Hope this will help

Thanks Nabil- that sounds like an easier way to do it than writing code for every instance, I'll give it a try.
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform