Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form Classes
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Divers
Thread ID:
00355853
Message ID:
00355892
Vues:
17
>>>>I would suggest to have one form with the 2-page pageframe, and instantiate the necessary number of pages at runtime with .Addobject method. <<
>>
>>
>>I'm a bit cloudy about this technique. Where is the addobject method located? Is it in the original 2-page pageframe? What would that code look like?
>>
>>Thanks.
>
>Any container class has Addobject method. In your case you may add the property to the form, say nPagesNumber. Set it to the number of pages required for yor form instance (say, 5). In Form.Init() you may put the code:
>
>lnPagesExist = thisform.Pageframe1.PageCount
>IF lnPagesExist < thisform.nPagesNumber
>
>FOR n = lnPagesExist to thisform.nPagesNumber
>thisform.pageframe1.addobject("Page" + alltrim(str(lnPagesExist + 1)),"Page")
>ENDFOR
>
>ENDIF
>
>Then you can change page captions to appropriate ones.

Macer is right, you can change the .PageCount property at any time, however .Addobject allows you to add your own custom pages, not only default ones.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform