You have to use a prg named newcol.prg (for instance)

Define Class mycol as Column

** put all the column properties you need here. I show only two as an example

     Procedure init

      this.width = 40
      this.header1.caption ='New col'

     endproc

EndDefine

You then instantiate it like so:

*form init

Set Procedure to newcol.prg additive

** add as many columns of the new class as you wish, in here I just add four of the new class

local cN,cV

for k = 3 to 6 && I assume your grid has originally 2 columns

     cN = alltrim(str(k))

     thisform.grid1.Addobject('column'+cN,'mycol')

     cV = 'thisform.grid1.column'+cN+'.visible = .t.'
     &cV
endfor

Rafael Copquin




El 27/02/2014 20:18, Gene Wirchenko escribió:
Dear Vixens and Reynards:

     How does one subclass Column and get it used?

According to Hacker's 6, this can not be done in the GUI, but I code nearly everything. I can not find where to specify an alternative Column class. If I have to explicitly instantiate the columns, where/when/how do I do it?

Sincerely,

Gene Wirchenko


[excessive quoting removed by server]

_______________________________________________
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