Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP6SP5 - Pages in a Pageframe PageOrder resets
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00793853
Message ID:
00795080
Vues:
15
Thanks.

Is there something like
for each opage in this
   for each ocontrol in this.opage
     copy origpage to mypageclass
   endfor
endfor
>Bhavbhuti,
>
>Upgrade to VFP8 and you can directly use your own Page subclasses.
>
>In earlier versions you can swap out classes. I did this in one of my Grid subclasses to swap out Header class objects.
>
>
for each loCol in this.Columns
>   with loCol
>      .Header1.Alignment = 0
>      if ( .Header1.Class == "Header" )
>         lcX = .Header1.Caption
>         .RemoveObject( "Header1" )
>         .AddObject( "Header1", "hdrSeeker", "" )
>         .Header1.Caption = lcX
>         .Header1.FontBold = .f.
>      endif
>   endwith
>endfor
>
>This let me design the grid completely visually but change it at runtime.
>
>I never really came up with a good case to need a page subclass. Swapping them out will be a little bit harder because you'll have to "move" all of the objects contained by one page to the other. But since a control can't change it's containership once instantiated you'd have to replicate the controls and that can be problematic. You are probably better off using a container of controls that won't get instantiated until your new page exists.
>
>All this it too much work and inconvience for my tastes. Using the PageRefresher class from my website on my cPageFrame class has really meant that I've never needed a Page subclass.
>
>>I guess custom properties on the pageframe are the name of the game. Incidently I had recently put up a thread asking if it is possible to switch the base class of say a page. At design time I use the default VFP page that I get. Define a programatical page class with my customizations MyPage. At run time the form switches the base class of all the pages from Page to MyPage thus take advantage of MyPage class.
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://venussoftop.tripod.com
___________________________________________
venussoftop@gmail.com
___________________________________________
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform