Gene Wirchenko wrote on 2013-09-26: 
>> Look at the MemberClass and MemberClassLibrary of the grid to use your
>> subclass of Column.
>> On the Column will ADD OBJECT what you want, you can define the
HeaderClass
>> and HeaderClassLibrary
> 
>        This appears to me to imply that one is expected to have only
>  one type of input control on a grid.  What would happen if I wanted a
>  textbox subclass and an editbox subclass (which I might well)?  Would
>  I have to go back to that kludge for the second subclass?
>  

Gene,

You can have multiple. 

You can do at design time as seen below. Or you can do it at runtime by
changing the MemberClass* properties then increasing the column count.

Tracy Pearson
PowerChurch Software


   LOCAL loForm
   loForm = CREATEOBJECT("testform")
   
   loForm.AddObject("grd", "grd")
   loForm.grd.visible = .T.
   
   loForm.Show(1)

   RELEASE loForm
   CLEAR CLASS "testform"

   DEFINE CLASS testform as Form
   width = 400
   height = 400
   datasession = 2

   PROCEDURE load
      CREATE CURSOR testdata ( ;
         ikey i, ;
         cone c(10), ;
         itwo i)
      INDEX ON ikey TAG ikey
      INDEX on itwo TAG itwo
      INSERT INTO testdata ;
         VALUES (1, "one", 1)
      INSERT INTO testdata ;
         VALUES (2, "three", 3)
      INSERT INTO testdata ;
         VALUES (3, "two", 2)
   ENDPROC 
   
   
   ENDDEFINE 
   
   DEFINE CLASS grd as grid 
      top = 10
      left = 10
      width = 380
      height = 380
      rowsource = "testdata"
      rowsourcetype = 1
      anchor = 15
      AllowCellSelection = .F.
      recordmark = .f.
      deletemark = .f.
      splitbar   = .f.
      memberclasslibrary = "prggridform.prg"
      memberclass = "clm"
      *-- It is important to set this AFTER memberclass*
      columncount = 2
      memberclass = "clmchk"
      columncount = 3

   PROCEDURE init
      this.clm1.controlsource = "testdata.cone"
      this.clm1.header1.caption = "One"
      this.clm2.controlsource = "testdata.itwo"
      this.clm2.header1.caption = "Two"
   ENDPROC 

   PROCEDURE DblClick
      ThisForm.Release()
   ENDPROC

   ENDDEFINE 

   DEFINE CLASS clm as Column 
      ADD OBJECT txt as txt
      sparse = .F.
   ENDDEFINE 
   DEFINE CLASS clmchk as Column 
      ADD OBJECT chk as checkbox
      sparse = .F.
   ENDDEFINE 
   
   DEFINE CLASS txt as TextBox
      forecolor = RGB(255,0,255)
   ENDDEFINE


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to