Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to remove a page from a PF at design time
Message
De
02/10/2008 22:25:58
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01352266
Message ID:
01352470
Vues:
28
>So, how do I remove these pages?

First, read Jim Booth's answer and remove all the pages you can - maybe I'd even be more radical than him and recommend that you remove all the pages (though that would make the pageframe hard to see).

To remove a page, select it in editor, then type this in command window (I usually keep the first two lines as a little prg, and have it in intellisense as a script, so in my command window it's ox=curform(), but the result is the same).
ASELOBJ(aa,1)
ox= aa[1]
?ox.baseclass
*  just checking... if you got yourself a member of the page, repeat this
ox=ox.parent
?ox.baseclass
*-- until it returns pageframe, or just start over. Once ox is your pageframe, 

ox.removeobject(ox.pages(9).name)
*-- or if you know the name
ox.removeobject("pg4")
*-- the easiest way to get rid of all the pages is to just set the pagecount to zero, and then have some code in some metadata or wherever, which will add pages one at a time. These pages may all be of the same class and have a parameter passed (name of the container class to slap on) or be subclassed from the same class (one per page - with controls or such a container already on them).

You may want to migrate the code and whatever you had in these pages into separate container or page classes, before doing this page cut.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform