Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Removing Pages from Pageframe at run time
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01665827
Message ID:
01665833
Vues:
55
>>>Hi,
>>>
>>>I have a form with a pageframe and 4 pages: Page1, Page2, Page3, and Page4
>>>
>>>Sometimes (depending on the user setup) I want only pages Page2 and Page4 visible. So, the Page 1 and Page3 are hidden as if they do not exist.
>>>
>>>How do I do it in the INIT of the form?
>>>
>>>TIA
>>
>>
>>oPgFrm = CREATEOBJECT("Pageframe")
>>oPgFrm.PageCount  =4
>>oPgFrm.RemoveObject("Page3")
>>
>
>Could you please clarify why you need the CREATEOBJECT("Pageframe")?
>
>The PageFrame (in my case) already created at design time. So, when I run the following code in the INIT of the form, I get error (object Page3 does not exist):
>
>oPgFrm = thisform.pageframe1
>oPgFrm.RemoveObject("page3")
>
>
>What am I missing?


:-)
Maybe the name of the page is NOT Page3?
Try with:
...
oPgFrm.RemoveObject(oPgFrm.Pages(3).Name)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform