Marc,
I've not tried this, but if in the designer you set the MemberClass property VFP warns you that it's going to destruct the grid and you'll lose all the column property settings. The column properties are all set in the grid's row in the VCX in the Properties memo.
This worked for me just now.
BACKUP everything first I'm not responsible if your stuff all gets blown away by this *g*
edit your grid class and make sure every column has an explicitly overridden Name property. If you don't do this you'll have to edit the Parent property of the headers and controls inside the column.
close the class designer.
use theClasslib.vcx
browse for baseclass = "grid"
add these lines at the top of the properties memo:
MemberClassLibrary = mycolumn.prg
MemberClass = "myColumn"
using your correct class and prg name...
edit the lines like
Column1.Movable = .F.
Column1.Name = "Column1"
Column2.Width = 25
Column2.Name = "Column2"
Column3.Name = "Column3"
to
myColumn1.Movable = .F.
myColumn1.Name = "Column1"
myColumn2.Width = 25
myColumn2.Name = "Column2"
myColumn3.Name = "Column3"
do not add any extra blank lines to the memo.
USE
compile classlib theClasslib
then you should be able to open the grid in the designer and it'll have your custom Column class with all the properties intact.
>... and are we supposed to re-design all our existing grids if we want to implement it?