Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Put code in grid's column class
Message
From
12/04/2002 06:08:21
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00642989
Message ID:
00644135
Views:
20
Hi Benoit,
>Define Class MyColumn As Column
>
>Function MouseMove
>LPARAMETERS nBouton, nMaj, nXCoord, nYCoord
>
>...Put Your Code Here
>
>EndFunc
>
>EndDefine
Where should I put the code ?

You see, in my command button I put the grid class :
	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)
       endwith
then 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
             ....
       endwith
and now I'm confuse where to put your code, since we can not put define class statement within an event/procedure.

regards,

budianto
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform