I have subclassed grid , column & header classes as :

>> my.vcx
define class mygrid as grid
memberclass="mycolumn"
memberclasslibrary="this.prg"
procedure init
set step on && just to be sure we are getting here
endproc
procedure error(x,y,z)
set step on && just to be sure we aren't getting here
endproc
enddefine

>> my.prg
define class mycolumn as column
headerclass="myheader"
headerclasslibrary="this.prg"
procedure init
set step on && just to be sure we are getting here
endproc
procedure error(x,y,z)
set step on && just to be sure we aren't getting here
endproc
enddefine

define class myheader as header
procedure init
set step on && just to be sure we are getting here
endproc
procedure error(x,y,z)
set step on && just to be sure we aren't getting here
endproc
enddefine

when i use mygrid everything seems to be ok
- all of the init()s get hit
- none of the error()s get hit
but - the column header captions are always blank.

if i change the mycolumn class to use the standard header , the captions
re-appear.

I assume that I am missing some small detail here but I don't see what it
is.
Any suggestions ?

Gerry

Re: custom columns/headers by gerry

gerry
Tue Mar 29 14:14:52 CST 2005

So do I assume then that no one ever uses custom header classes ?


"gerry" <germ@hotmail.com> wrote in message
news:O3qK4TPMFHA.1396@TK2MSFTNGP10.phx.gbl...
> I have subclassed grid , column & header classes as :
>
> >> my.vcx
> define class mygrid as grid
> memberclass="mycolumn"
> memberclasslibrary="this.prg"
> procedure init
> set step on && just to be sure we are getting here
> endproc
> procedure error(x,y,z)
> set step on && just to be sure we aren't getting
here
> endproc
> enddefine
>
> >> my.prg
> define class mycolumn as column
> headerclass="myheader"
> headerclasslibrary="this.prg"
> procedure init
> set step on && just to be sure we are getting here
> endproc
> procedure error(x,y,z)
> set step on && just to be sure we aren't getting
here
> endproc
> enddefine
>
> define class myheader as header
> procedure init
> set step on && just to be sure we are getting here
> endproc
> procedure error(x,y,z)
> set step on && just to be sure we aren't getting
here
> endproc
> enddefine
>
> when i use mygrid everything seems to be ok
> - all of the init()s get hit
> - none of the error()s get hit
> but - the column header captions are always blank.
>
> if i change the mycolumn class to use the standard header , the captions
> re-appear.
>
> I assume that I am missing some small detail here but I don't see what it
> is.
> Any suggestions ?
>
> Gerry
>
>
>
>



Re: custom columns/headers by Dan

Dan
Tue Mar 29 15:54:36 CST 2005

Sure. I've been using custom headers since VFP3.

I don't see any header.caption being set in the code you posted. IIRC, they
default to empty.

Dan

gerry wrote:
> So do I assume then that no one ever uses custom header classes ?
>
>
> "gerry" <germ@hotmail.com> wrote in message
> news:O3qK4TPMFHA.1396@TK2MSFTNGP10.phx.gbl...
>> I have subclassed grid , column & header classes as :
>>
>> >> my.vcx
>> define class mygrid as grid
>> memberclass="mycolumn"
>> memberclasslibrary="this.prg"
>> procedure init
>> set step on && just to be sure we are getting here
>> endproc
>> procedure error(x,y,z)
>> set step on && just to be sure we aren't
>> getting here endproc
>> enddefine
>>
>> >> my.prg
>> define class mycolumn as column
>> headerclass="myheader"
>> headerclasslibrary="this.prg"
>> procedure init
>> set step on && just to be sure we are getting here
>> endproc
>> procedure error(x,y,z)
>> set step on && just to be sure we aren't
>> getting here endproc
>> enddefine
>>
>> define class myheader as header
>> procedure init
>> set step on && just to be sure we are getting here
>> endproc
>> procedure error(x,y,z)
>> set step on && just to be sure we aren't
>> getting here endproc
>> enddefine
>>
>> when i use mygrid everything seems to be ok
>> - all of the init()s get hit
>> - none of the error()s get hit
>> but - the column header captions are always blank.
>>
>> if i change the mycolumn class to use the standard header , the
>> captions re-appear.
>>
>> I assume that I am missing some small detail here but I don't see
>> what it is.
>> Any suggestions ?
>>
>> Gerry



Re: custom columns/headers by gerry

gerry
Tue Mar 29 17:01:27 CST 2005

Hi Dan ,

that's correct, in this case I'm not setting the caption expecting that it
will be set when the grid's RecordSource is assigned as per default header
behaviour - but it isn't.

Gerry



"Dan Freeman" <spam@microsoft.com> wrote in message
news:%23anQnnKNFHA.1948@TK2MSFTNGP14.phx.gbl...
> Sure. I've been using custom headers since VFP3.
>
> I don't see any header.caption being set in the code you posted. IIRC,
they
> default to empty.
>
> Dan
>
> gerry wrote:
> > So do I assume then that no one ever uses custom header classes ?
> >
> >
> > "gerry" <germ@hotmail.com> wrote in message
> > news:O3qK4TPMFHA.1396@TK2MSFTNGP10.phx.gbl...
> >> I have subclassed grid , column & header classes as :
> >>
> >> >> my.vcx
> >> define class mygrid as grid
> >> memberclass="mycolumn"
> >> memberclasslibrary="this.prg"
> >> procedure init
> >> set step on && just to be sure we are getting here
> >> endproc
> >> procedure error(x,y,z)
> >> set step on && just to be sure we aren't
> >> getting here endproc
> >> enddefine
> >>
> >> >> my.prg
> >> define class mycolumn as column
> >> headerclass="myheader"
> >> headerclasslibrary="this.prg"
> >> procedure init
> >> set step on && just to be sure we are getting here
> >> endproc
> >> procedure error(x,y,z)
> >> set step on && just to be sure we aren't
> >> getting here endproc
> >> enddefine
> >>
> >> define class myheader as header
> >> procedure init
> >> set step on && just to be sure we are getting here
> >> endproc
> >> procedure error(x,y,z)
> >> set step on && just to be sure we aren't
> >> getting here endproc
> >> enddefine
> >>
> >> when i use mygrid everything seems to be ok
> >> - all of the init()s get hit
> >> - none of the error()s get hit
> >> but - the column header captions are always blank.
> >>
> >> if i change the mycolumn class to use the standard header , the
> >> captions re-appear.
> >>
> >> I assume that I am missing some small detail here but I don't see
> >> what it is.
> >> Any suggestions ?
> >>
> >> Gerry
>
>



Re: custom columns/headers by Dan

Dan
Tue Mar 29 17:24:30 CST 2005

As I said, it starts empty and stays empty until you set it.

Dan

gerry wrote:
> Hi Dan ,
>
> that's correct, in this case I'm not setting the caption expecting
> that it will be set when the grid's RecordSource is assigned as per
> default header behaviour - but it isn't.
>
> Gerry
>
>
>
> "Dan Freeman" <spam@microsoft.com> wrote in message
> news:%23anQnnKNFHA.1948@TK2MSFTNGP14.phx.gbl...
>> Sure. I've been using custom headers since VFP3.
>>
>> I don't see any header.caption being set in the code you posted.
>> IIRC, they default to empty.
>>
>> Dan
>>
>> gerry wrote:
>>> So do I assume then that no one ever uses custom header classes ?
>>>
>>>
>>> "gerry" <germ@hotmail.com> wrote in message
>>> news:O3qK4TPMFHA.1396@TK2MSFTNGP10.phx.gbl...
>>>> I have subclassed grid , column & header classes as :
>>>>
>>>> >> my.vcx
>>>> define class mygrid as grid
>>>> memberclass="mycolumn"
>>>> memberclasslibrary="this.prg"
>>>> procedure init
>>>> set step on && just to be sure we are getting
>>>> here endproc
>>>> procedure error(x,y,z)
>>>> set step on && just to be sure we aren't
>>>> getting here endproc
>>>> enddefine
>>>>
>>>> >> my.prg
>>>> define class mycolumn as column
>>>> headerclass="myheader"
>>>> headerclasslibrary="this.prg"
>>>> procedure init
>>>> set step on && just to be sure we are getting
>>>> here endproc
>>>> procedure error(x,y,z)
>>>> set step on && just to be sure we aren't
>>>> getting here endproc
>>>> enddefine
>>>>
>>>> define class myheader as header
>>>> procedure init
>>>> set step on && just to be sure we are getting
>>>> here endproc
>>>> procedure error(x,y,z)
>>>> set step on && just to be sure we aren't
>>>> getting here endproc
>>>> enddefine
>>>>
>>>> when i use mygrid everything seems to be ok
>>>> - all of the init()s get hit
>>>> - none of the error()s get hit
>>>> but - the column header captions are always blank.
>>>>
>>>> if i change the mycolumn class to use the standard header , the
>>>> captions re-appear.
>>>>
>>>> I assume that I am missing some small detail here but I don't see
>>>> what it is.
>>>> Any suggestions ?
>>>>
>>>> Gerry



Re: custom columns/headers by gerry

gerry
Tue Mar 29 17:27:07 CST 2005

More specifically , if a record source is assigned at design time and the
columncount is left at -1 , then no captions are assigned.
if the grid is assigned or re-assigned a new recordsource at runtime , such
that the columns are recreated , no captions are assigned.
if the grid is re-assigned a record source at runtime such that the columns
are not recreated by first setting the recordsource to " " then the captions
are assigned

note that in any case the Caption_Assign() method is never called in any
case


"gerry" <germ@hotmail.com> wrote in message
news:%23NlUjNLNFHA.3000@TK2MSFTNGP10.phx.gbl...
> Hi Dan ,
>
> that's correct, in this case I'm not setting the caption expecting that it
> will be set when the grid's RecordSource is assigned as per default header
> behaviour - but it isn't.
>
> Gerry
>
>
>
> "Dan Freeman" <spam@microsoft.com> wrote in message
> news:%23anQnnKNFHA.1948@TK2MSFTNGP14.phx.gbl...
> > Sure. I've been using custom headers since VFP3.
> >
> > I don't see any header.caption being set in the code you posted. IIRC,
> they
> > default to empty.
> >
> > Dan
> >
> > gerry wrote:
> > > So do I assume then that no one ever uses custom header classes ?
> > >
> > >
> > > "gerry" <germ@hotmail.com> wrote in message
> > > news:O3qK4TPMFHA.1396@TK2MSFTNGP10.phx.gbl...
> > >> I have subclassed grid , column & header classes as :
> > >>
> > >> >> my.vcx
> > >> define class mygrid as grid
> > >> memberclass="mycolumn"
> > >> memberclasslibrary="this.prg"
> > >> procedure init
> > >> set step on && just to be sure we are getting here
> > >> endproc
> > >> procedure error(x,y,z)
> > >> set step on && just to be sure we aren't
> > >> getting here endproc
> > >> enddefine
> > >>
> > >> >> my.prg
> > >> define class mycolumn as column
> > >> headerclass="myheader"
> > >> headerclasslibrary="this.prg"
> > >> procedure init
> > >> set step on && just to be sure we are getting here
> > >> endproc
> > >> procedure error(x,y,z)
> > >> set step on && just to be sure we aren't
> > >> getting here endproc
> > >> enddefine
> > >>
> > >> define class myheader as header
> > >> procedure init
> > >> set step on && just to be sure we are getting here
> > >> endproc
> > >> procedure error(x,y,z)
> > >> set step on && just to be sure we aren't
> > >> getting here endproc
> > >> enddefine
> > >>
> > >> when i use mygrid everything seems to be ok
> > >> - all of the init()s get hit
> > >> - none of the error()s get hit
> > >> but - the column header captions are always blank.
> > >>
> > >> if i change the mycolumn class to use the standard header , the
> > >> captions re-appear.
> > >>
> > >> I assume that I am missing some small detail here but I don't see
> > >> what it is.
> > >> Any suggestions ?
> > >>
> > >> Gerry
> >
> >
>
>



Re: custom columns/headers by gerry

gerry
Tue Mar 29 17:38:48 CST 2005

but it shouldn't - default header behaviour is to reset the captions when a
new record source is assigned to the grid.
how do you ever know when to set it and what to set it to ?
I'm not implementing any code or modifying any property values in my derived
classes - so the behaviour should still be 100% the same as the default.

it is starting to look an awful lot like either the grid , column or header
classes that we can derive from are not the same as the default grid ,
column and header classes used by the default vfp grid else derived classes
would behave 100% exactly the same as the default objects.

Gerry



"Dan Freeman" <spam@microsoft.com> wrote in message
news:uN6b2ZLNFHA.3788@tk2msftngp13.phx.gbl...
> As I said, it starts empty and stays empty until you set it.
>
> Dan
>
> gerry wrote:
> > Hi Dan ,
> >
> > that's correct, in this case I'm not setting the caption expecting
> > that it will be set when the grid's RecordSource is assigned as per
> > default header behaviour - but it isn't.
> >
> > Gerry
> >
> >
> >
> > "Dan Freeman" <spam@microsoft.com> wrote in message
> > news:%23anQnnKNFHA.1948@TK2MSFTNGP14.phx.gbl...
> >> Sure. I've been using custom headers since VFP3.
> >>
> >> I don't see any header.caption being set in the code you posted.
> >> IIRC, they default to empty.
> >>
> >> Dan
> >>
> >> gerry wrote:
> >>> So do I assume then that no one ever uses custom header classes ?
> >>>
> >>>
> >>> "gerry" <germ@hotmail.com> wrote in message
> >>> news:O3qK4TPMFHA.1396@TK2MSFTNGP10.phx.gbl...
> >>>> I have subclassed grid , column & header classes as :
> >>>>
> >>>> >> my.vcx
> >>>> define class mygrid as grid
> >>>> memberclass="mycolumn"
> >>>> memberclasslibrary="this.prg"
> >>>> procedure init
> >>>> set step on && just to be sure we are getting
> >>>> here endproc
> >>>> procedure error(x,y,z)
> >>>> set step on && just to be sure we aren't
> >>>> getting here endproc
> >>>> enddefine
> >>>>
> >>>> >> my.prg
> >>>> define class mycolumn as column
> >>>> headerclass="myheader"
> >>>> headerclasslibrary="this.prg"
> >>>> procedure init
> >>>> set step on && just to be sure we are getting
> >>>> here endproc
> >>>> procedure error(x,y,z)
> >>>> set step on && just to be sure we aren't
> >>>> getting here endproc
> >>>> enddefine
> >>>>
> >>>> define class myheader as header
> >>>> procedure init
> >>>> set step on && just to be sure we are getting
> >>>> here endproc
> >>>> procedure error(x,y,z)
> >>>> set step on && just to be sure we aren't
> >>>> getting here endproc
> >>>> enddefine
> >>>>
> >>>> when i use mygrid everything seems to be ok
> >>>> - all of the init()s get hit
> >>>> - none of the error()s get hit
> >>>> but - the column header captions are always blank.
> >>>>
> >>>> if i change the mycolumn class to use the standard header , the
> >>>> captions re-appear.
> >>>>
> >>>> I assume that I am missing some small detail here but I don't see
> >>>> what it is.
> >>>> Any suggestions ?
> >>>>
> >>>> Gerry
>
>



Re: custom columns/headers by Dan

Dan
Wed Mar 30 12:25:16 CST 2005

You're observing the difference between what VFP chooses to do when you drop
a control on a form, and when you drop one of your own. There are MANY
different behaviors.

If you drop a label on a form, VFP sets .Visible=.t. and adds a default
caption. But if you AddObject(), it doesn't. You have to set all those other
attributes yourself.

Dan

gerry wrote:
> but it shouldn't - default header behaviour is to reset the captions
> when a new record source is assigned to the grid.
> how do you ever know when to set it and what to set it to ?
> I'm not implementing any code or modifying any property values in my
> derived classes - so the behaviour should still be 100% the same as
> the default.
>
> it is starting to look an awful lot like either the grid , column or
> header classes that we can derive from are not the same as the
> default grid , column and header classes used by the default vfp grid
> else derived classes would behave 100% exactly the same as the
> default objects.
>
> Gerry
>
>
>
> "Dan Freeman" <spam@microsoft.com> wrote in message
> news:uN6b2ZLNFHA.3788@tk2msftngp13.phx.gbl...
>> As I said, it starts empty and stays empty until you set it.
>>
>> Dan
>>
>> gerry wrote:
>>> Hi Dan ,
>>>
>>> that's correct, in this case I'm not setting the caption expecting
>>> that it will be set when the grid's RecordSource is assigned as per
>>> default header behaviour - but it isn't.
>>>
>>> Gerry
>>>
>>>
>>>
>>> "Dan Freeman" <spam@microsoft.com> wrote in message
>>> news:%23anQnnKNFHA.1948@TK2MSFTNGP14.phx.gbl...
>>>> Sure. I've been using custom headers since VFP3.
>>>>
>>>> I don't see any header.caption being set in the code you posted.
>>>> IIRC, they default to empty.
>>>>
>>>> Dan
>>>>
>>>> gerry wrote:
>>>>> So do I assume then that no one ever uses custom header classes ?
>>>>>
>>>>>
>>>>> "gerry" <germ@hotmail.com> wrote in message
>>>>> news:O3qK4TPMFHA.1396@TK2MSFTNGP10.phx.gbl...
>>>>>> I have subclassed grid , column & header classes as :
>>>>>>
>>>>>> >> my.vcx
>>>>>> define class mygrid as grid
>>>>>> memberclass="mycolumn"
>>>>>> memberclasslibrary="this.prg"
>>>>>> procedure init
>>>>>> set step on && just to be sure we are getting
>>>>>> here endproc
>>>>>> procedure error(x,y,z)
>>>>>> set step on && just to be sure we aren't
>>>>>> getting here endproc
>>>>>> enddefine
>>>>>>
>>>>>> >> my.prg
>>>>>> define class mycolumn as column
>>>>>> headerclass="myheader"
>>>>>> headerclasslibrary="this.prg"
>>>>>> procedure init
>>>>>> set step on && just to be sure we are getting
>>>>>> here endproc
>>>>>> procedure error(x,y,z)
>>>>>> set step on && just to be sure we aren't
>>>>>> getting here endproc
>>>>>> enddefine
>>>>>>
>>>>>> define class myheader as header
>>>>>> procedure init
>>>>>> set step on && just to be sure we are getting
>>>>>> here endproc
>>>>>> procedure error(x,y,z)
>>>>>> set step on && just to be sure we aren't
>>>>>> getting here endproc
>>>>>> enddefine
>>>>>>
>>>>>> when i use mygrid everything seems to be ok
>>>>>> - all of the init()s get hit
>>>>>> - none of the error()s get hit
>>>>>> but - the column header captions are always blank.
>>>>>>
>>>>>> if i change the mycolumn class to use the standard header , the
>>>>>> captions re-appear.
>>>>>>
>>>>>> I assume that I am missing some small detail here but I don't see
>>>>>> what it is.
>>>>>> Any suggestions ?
>>>>>>
>>>>>> Gerry



Re: custom columns/headers by gerry

gerry
Wed Mar 30 23:46:04 CST 2005

sorry but i don't see your point , if i drop label on a form or a derived
label on a form , the behaviour of the 2 is 100% identical unless I have
modified the derived class to change its behaviour.
I am specifying that a grid should use my column class which should use my
header class.
this grid is then dropped on a form - I haven't modified any properties or
overridden any methods - there is no behaviour to have changed.

taking your tack - how do dynamic header captions ever get assigned using
custom header classes ? I have no way to know what the caption should be or
when it should be updated.

Gerry




"Dan Freeman" <spam@microsoft.com> wrote in message
news:uKwbTXVNFHA.3796@TK2MSFTNGP10.phx.gbl...
> You're observing the difference between what VFP chooses to do when you
drop
> a control on a form, and when you drop one of your own. There are MANY
> different behaviors.
>
> If you drop a label on a form, VFP sets .Visible=.t. and adds a default
> caption. But if you AddObject(), it doesn't. You have to set all those
other
> attributes yourself.
>
> Dan
>
> gerry wrote:
> > but it shouldn't - default header behaviour is to reset the captions
> > when a new record source is assigned to the grid.
> > how do you ever know when to set it and what to set it to ?
> > I'm not implementing any code or modifying any property values in my
> > derived classes - so the behaviour should still be 100% the same as
> > the default.
> >
> > it is starting to look an awful lot like either the grid , column or
> > header classes that we can derive from are not the same as the
> > default grid , column and header classes used by the default vfp grid
> > else derived classes would behave 100% exactly the same as the
> > default objects.
> >
> > Gerry
> >
> >
> >
> > "Dan Freeman" <spam@microsoft.com> wrote in message
> > news:uN6b2ZLNFHA.3788@tk2msftngp13.phx.gbl...
> >> As I said, it starts empty and stays empty until you set it.
> >>
> >> Dan
> >>
> >> gerry wrote:
> >>> Hi Dan ,
> >>>
> >>> that's correct, in this case I'm not setting the caption expecting
> >>> that it will be set when the grid's RecordSource is assigned as per
> >>> default header behaviour - but it isn't.
> >>>
> >>> Gerry
> >>>
> >>>
> >>>
> >>> "Dan Freeman" <spam@microsoft.com> wrote in message
> >>> news:%23anQnnKNFHA.1948@TK2MSFTNGP14.phx.gbl...
> >>>> Sure. I've been using custom headers since VFP3.
> >>>>
> >>>> I don't see any header.caption being set in the code you posted.
> >>>> IIRC, they default to empty.
> >>>>
> >>>> Dan
> >>>>
> >>>> gerry wrote:
> >>>>> So do I assume then that no one ever uses custom header classes ?
> >>>>>
> >>>>>
> >>>>> "gerry" <germ@hotmail.com> wrote in message
> >>>>> news:O3qK4TPMFHA.1396@TK2MSFTNGP10.phx.gbl...
> >>>>>> I have subclassed grid , column & header classes as :
> >>>>>>
> >>>>>> >> my.vcx
> >>>>>> define class mygrid as grid
> >>>>>> memberclass="mycolumn"
> >>>>>> memberclasslibrary="this.prg"
> >>>>>> procedure init
> >>>>>> set step on && just to be sure we are getting
> >>>>>> here endproc
> >>>>>> procedure error(x,y,z)
> >>>>>> set step on && just to be sure we aren't
> >>>>>> getting here endproc
> >>>>>> enddefine
> >>>>>>
> >>>>>> >> my.prg
> >>>>>> define class mycolumn as column
> >>>>>> headerclass="myheader"
> >>>>>> headerclasslibrary="this.prg"
> >>>>>> procedure init
> >>>>>> set step on && just to be sure we are getting
> >>>>>> here endproc
> >>>>>> procedure error(x,y,z)
> >>>>>> set step on && just to be sure we aren't
> >>>>>> getting here endproc
> >>>>>> enddefine
> >>>>>>
> >>>>>> define class myheader as header
> >>>>>> procedure init
> >>>>>> set step on && just to be sure we are getting
> >>>>>> here endproc
> >>>>>> procedure error(x,y,z)
> >>>>>> set step on && just to be sure we aren't
> >>>>>> getting here endproc
> >>>>>> enddefine
> >>>>>>
> >>>>>> when i use mygrid everything seems to be ok
> >>>>>> - all of the init()s get hit
> >>>>>> - none of the error()s get hit
> >>>>>> but - the column header captions are always blank.
> >>>>>>
> >>>>>> if i change the mycolumn class to use the standard header , the
> >>>>>> captions re-appear.
> >>>>>>
> >>>>>> I assume that I am missing some small detail here but I don't see
> >>>>>> what it is.
> >>>>>> Any suggestions ?
> >>>>>>
> >>>>>> Gerry
>
>



Re: custom columns/headers by Anders

Anders
Thu Mar 31 02:43:53 CST 2005

The defauilt header caption is
PROPER(JUSTEXT(This.Parent.ControlSoiurce))
or Proper(Field(n, this.Parent.Parent.RecordSource))
or whatever you have set up as default field caption in the Table
properties.
isn't it?
-Anders

"gerry" <germ@hotmail.com> wrote in message
news:#RY9TUbNFHA.2736@tk2msftngp13.phx.gbl...
> sorry but i don't see your point , if i drop label on a form or a derived
> label on a form , the behaviour of the 2 is 100% identical unless I have
> modified the derived class to change its behaviour.
> I am specifying that a grid should use my column class which should use my
> header class.
> this grid is then dropped on a form - I haven't modified any properties or
> overridden any methods - there is no behaviour to have changed.
>
> taking your tack - how do dynamic header captions ever get assigned using
> custom header classes ? I have no way to know what the caption should be
or
> when it should be updated.
>
> Gerry
>
>
>
>
> "Dan Freeman" <spam@microsoft.com> wrote in message
> news:uKwbTXVNFHA.3796@TK2MSFTNGP10.phx.gbl...
> > You're observing the difference between what VFP chooses to do when you
> drop
> > a control on a form, and when you drop one of your own. There are MANY
> > different behaviors.
> >
> > If you drop a label on a form, VFP sets .Visible=.t. and adds a default
> > caption. But if you AddObject(), it doesn't. You have to set all those
> other
> > attributes yourself.
> >
> > Dan
> >
> > gerry wrote:
> > > but it shouldn't - default header behaviour is to reset the captions
> > > when a new record source is assigned to the grid.
> > > how do you ever know when to set it and what to set it to ?
> > > I'm not implementing any code or modifying any property values in my
> > > derived classes - so the behaviour should still be 100% the same as
> > > the default.
> > >
> > > it is starting to look an awful lot like either the grid , column or
> > > header classes that we can derive from are not the same as the
> > > default grid , column and header classes used by the default vfp grid
> > > else derived classes would behave 100% exactly the same as the
> > > default objects.
> > >
> > > Gerry
> > >
> > >
> > >
> > > "Dan Freeman" <spam@microsoft.com> wrote in message
> > > news:uN6b2ZLNFHA.3788@tk2msftngp13.phx.gbl...
> > >> As I said, it starts empty and stays empty until you set it.
> > >>
> > >> Dan
> > >>
> > >> gerry wrote:
> > >>> Hi Dan ,
> > >>>
> > >>> that's correct, in this case I'm not setting the caption expecting
> > >>> that it will be set when the grid's RecordSource is assigned as per
> > >>> default header behaviour - but it isn't.
> > >>>
> > >>> Gerry
> > >>>
> > >>>
> > >>>
> > >>> "Dan Freeman" <spam@microsoft.com> wrote in message
> > >>> news:%23anQnnKNFHA.1948@TK2MSFTNGP14.phx.gbl...
> > >>>> Sure. I've been using custom headers since VFP3.
> > >>>>
> > >>>> I don't see any header.caption being set in the code you posted.
> > >>>> IIRC, they default to empty.
> > >>>>
> > >>>> Dan
> > >>>>
> > >>>> gerry wrote:
> > >>>>> So do I assume then that no one ever uses custom header classes ?
> > >>>>>
> > >>>>>
> > >>>>> "gerry" <germ@hotmail.com> wrote in message
> > >>>>> news:O3qK4TPMFHA.1396@TK2MSFTNGP10.phx.gbl...
> > >>>>>> I have subclassed grid , column & header classes as :
> > >>>>>>
> > >>>>>> >> my.vcx
> > >>>>>> define class mygrid as grid
> > >>>>>> memberclass="mycolumn"
> > >>>>>> memberclasslibrary="this.prg"
> > >>>>>> procedure init
> > >>>>>> set step on && just to be sure we are getting
> > >>>>>> here endproc
> > >>>>>> procedure error(x,y,z)
> > >>>>>> set step on && just to be sure we aren't
> > >>>>>> getting here endproc
> > >>>>>> enddefine
>