>Define Class MyColumn As Column > >Function MouseMove >LPARAMETERS nBouton, nMaj, nXCoord, nYCoord > >...Put Your Code Here > >EndFunc > >EndDefineWhere should I put the code ?
set classlib to mygrid.vcx Thisform.addobject('grid1','mygrid')and in the grid class I put the code in init event :
with thisform.grid1 .recordsource='tmpfile' .columncount=12 .scrollbars=3 .left=40 .height=253 .top=150 .width=711 .gridlinecolor=rgb(97,105,156) .backcolor=rgb(97,105,156) endwiththen I made a subclass for creating coloumns of the grid like you told me, and in the init event, I put the user-defined column :
with thisform.grid1 .column1.controlsource='tmpfile->field' .column1.header1.caption='MATERIAL NAME' .column1.header1.forecolor=rgb(255,255,255) .column1.header1.backcolor=rgb(97,105,156) .column1.width=340 .... endwithand now I'm confuse where to put your code, since we can not put define class statement within an event/procedure.