* mygrid.prg define class MyText as textbox name = 'MyText' proc Click this.Parent.Parent.click() endproc enddefine define class myheader as header name = 'MyHeader' procedure mClick endproc enddefine * Before using MyText or myheader classes, issue SET CLASSLIB to mygrid.prg ...>Hi I am trying to build some grid items at runtime ie. adding columns, headers and textboxes... I have managed to define a textbox into one of my class libraries so that's OK but I can't define a header I have this so far...
>public myheader >do gridsupport >>
>define class myheader as header >name = 'MyHeader' >procedure mClick >endproc >enddefine >>
>* set columncount >intCols = 6 >* set up the headers and control sources for the grid >for intLoop = 1 to intCols >.addcolumn(intLoop) >.columns(intLoop).removeobject('Header1') >.columns(intLoop).removeobject('Text1') >.columns(intLoop).addobject('Header1', 'myheader') >.columns(intLoop).addobject('Text1', 'MyText') >endfor >>