>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
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.