Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP6SP5 - Change parentclass on-the-fly
Message
De
24/05/2003 14:16:43
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00792530
Message ID:
00792579
Vues:
21
This message has been marked as a message which has helped to the initial question of the thread.
>I have this idea. I design form with a pageframe with pages (default VFP pages) containng grid, txt, etc. in the designer. I start the app and this form.
>
>When the form instantiates, I would like to switch the baseclass of the pages from VFP default to one I may have define programmatically. All else, ie. the control on these pages should be as-is. This would facilicate designing visually and get the advantage of the non-visual defination of pages.
>
>We could further this idea to columns and headers!!!

I also do something similar for our framework admin options. For example, with Admin priviledge, you could go in an additional menu where an option would read all the entries from our Table.dbf file and will show a list of tables we have in the applications. Clicking on it will start a form that, at design time, only contains our grid class. So, as we don't know ahead which table it'd be, at design time, it's impossible to deal with the number of columns, etc. So, once the form loads, we have something like this in the Init() of the grid class:
FOR lnCompteur=1 TO ThisForm.Recherche.ColumnCount

    * We have to replace the Visual FoxPro base text control with our class
    ThisForm.Recherche.Columns(lnCompteur).RemoveObject('Text1')
    ThisForm.Recherche.Columns(lnCompteur).AddObject('Text1','txtField')
So, basically, it's similar to you. Once we plug the number of columns in ColumnCount, this will by default put all Visual FoxPro base classes. This is not what we want. So, we use this approach. It removes it and put ours instead.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform