I'm trying to use the Member class feature of VFP 8 to create classes for
1). Grid class (which uses the Member class feature for mapping Columns)
2). Column class in a PRG (which uses the HeaderClass for mapping Header
class)
3). Header class in a PRG (for the Column Class).

I've created a Visual class for the Grid, & have set the Member Class &
Class Library properties of the grid
for the Column class (in the PRG).
The contents of the PRG (for the Column & Header classes is as follows)

DEFINE CLASS uColumn AS Column
HeaderClassLibrary = 'F:\MyHeader.FXP'
HeaderClass = 'oHeader'
ENDDEFINE

&& Below is the code from MyHeader.PRG

DEFINE CLASS oHeader AS Header
Alignment = 2
FontSize = 8
Caption = "Header"
Name = "Header"
ENDDEFINE

When i drop the Grid class on a form & use it, its all fine,
The caption of the Header is Center Aligned.
But, if i go & change this Alignment of the Header caption to Left (0) in
the MyHeader.PRG & compile it,
then the changes are NOT reflected in the GRID (form).

The changes APPEAR ONLY IF, i change the column count in the Grid (on the
form) to a greater value, & run the form again.
Ie, I HAVE TO REFRESH the GRID to retrive the Column class from the PRG once
again, which in turn refreshes its setting
for the HEADER CLASS from the HeaderClass & HeaderClassLibrary.

Am i doing something wrong here.
Cuz, if this is how it works, then I'll have to modify ALL my forms, when
ever i make a change to the Header Class in the PRG.

Best Regards,

Paul

Re: using member classes in VFP 8 for grid columns & headers by Devapriya

Devapriya
Tue Aug 10 22:37:21 CDT 2004

Hi Paul,

You are not doing anything wrong I guess.
This is the default behavior of it.
i.e.
Changing MemberClass and MemberClassLibrary affects only newly created
member objects, not existing member objects in the container.

This is documented under the memberclass property help found in the visual
foxpro language reference.

The other option is for you to build the grid dynamically in your visual
class.
Kind Regards,
Devapriya De Silva

"Paul Wilson" <paul@thisisadummyemailaddress.com> wrote in message
news:uqNTuw0fEHA.720@TK2MSFTNGP11.phx.gbl...
> I'm trying to use the Member class feature of VFP 8 to create classes for
> 1). Grid class (which uses the Member class feature for mapping Columns)
> 2). Column class in a PRG (which uses the HeaderClass for mapping Header
> class)
> 3). Header class in a PRG (for the Column Class).
>
> I've created a Visual class for the Grid, & have set the Member Class &
> Class Library properties of the grid
> for the Column class (in the PRG).
> The contents of the PRG (for the Column & Header classes is as follows)
>
> DEFINE CLASS uColumn AS Column
> HeaderClassLibrary = 'F:\MyHeader.FXP'
> HeaderClass = 'oHeader'
> ENDDEFINE
>
> && Below is the code from MyHeader.PRG
>
> DEFINE CLASS oHeader AS Header
> Alignment = 2
> FontSize = 8
> Caption = "Header"
> Name = "Header"
> ENDDEFINE
>
> When i drop the Grid class on a form & use it, its all fine,
> The caption of the Header is Center Aligned.
> But, if i go & change this Alignment of the Header caption to Left (0) in
> the MyHeader.PRG & compile it,
> then the changes are NOT reflected in the GRID (form).
>
> The changes APPEAR ONLY IF, i change the column count in the Grid (on the
> form) to a greater value, & run the form again.
> Ie, I HAVE TO REFRESH the GRID to retrive the Column class from the PRG
once
> again, which in turn refreshes its setting
> for the HEADER CLASS from the HeaderClass & HeaderClassLibrary.
>
> Am i doing something wrong here.
> Cuz, if this is how it works, then I'll have to modify ALL my forms, when
> ever i make a change to the Header Class in the PRG.
>
> Best Regards,
>
> Paul
>
>



Re: using member classes in VFP 8 for grid columns & headers by Sietse

Sietse
Wed Aug 11 03:16:51 CDT 2004

Repost of my message in the grids-group (now with proper formatting ;-)):
Hi Paul,

From the VFP Help on the HeaderClass property:
Column.HeaderClass [ = cClassName ]

cClassName
Specifies the name of a member class in a program (.prg) file.

In your code you're referring to an fxp.
I've tried your example without any trouble, but i used the prg-file to
refer to in the Memberclass property of the column. When I changed it to
point to the fxp, it indeed showed the same symptoms you're referring to.

HTH,
Sietse Wijnker

"Devapriya De Silva" <ddesilva@qa-software.com> wrote in message
news:%23cSrES1fEHA.636@TK2MSFTNGP12.phx.gbl...
> Hi Paul,
>
> You are not doing anything wrong I guess.
> This is the default behavior of it.
> i.e.
> Changing MemberClass and MemberClassLibrary affects only newly created
> member objects, not existing member objects in the container.
>
> This is documented under the memberclass property help found in the visual
> foxpro language reference.
>
> The other option is for you to build the grid dynamically in your visual
> class.
> Kind Regards,
> Devapriya De Silva
>
> "Paul Wilson" <paul@thisisadummyemailaddress.com> wrote in message
> news:uqNTuw0fEHA.720@TK2MSFTNGP11.phx.gbl...
> > I'm trying to use the Member class feature of VFP 8 to create classes
for
> > 1). Grid class (which uses the Member class feature for mapping Columns)
> > 2). Column class in a PRG (which uses the HeaderClass for mapping Header
> > class)
> > 3). Header class in a PRG (for the Column Class).
> >
> > I've created a Visual class for the Grid, & have set the Member Class &
> > Class Library properties of the grid
> > for the Column class (in the PRG).
> > The contents of the PRG (for the Column & Header classes is as follows)
> >
> > DEFINE CLASS uColumn AS Column
> > HeaderClassLibrary = 'F:\MyHeader.FXP'
> > HeaderClass = 'oHeader'
> > ENDDEFINE
> >
> > && Below is the code from MyHeader.PRG
> >
> > DEFINE CLASS oHeader AS Header
> > Alignment = 2
> > FontSize = 8
> > Caption = "Header"
> > Name = "Header"
> > ENDDEFINE
> >
> > When i drop the Grid class on a form & use it, its all fine,
> > The caption of the Header is Center Aligned.
> > But, if i go & change this Alignment of the Header caption to Left (0)
in
> > the MyHeader.PRG & compile it,
> > then the changes are NOT reflected in the GRID (form).
> >
> > The changes APPEAR ONLY IF, i change the column count in the Grid (on
the
> > form) to a greater value, & run the form again.
> > Ie, I HAVE TO REFRESH the GRID to retrive the Column class from the PRG
> once
> > again, which in turn refreshes its setting
> > for the HEADER CLASS from the HeaderClass & HeaderClassLibrary.
> >
> > Am i doing something wrong here.
> > Cuz, if this is how it works, then I'll have to modify ALL my forms,
when
> > ever i make a change to the Header Class in the PRG.
> >
> > Best Regards,
> >
> > Paul
> >
> >
>
>



Re: using member classes in VFP 8 for grid columns & headers by Paul

Paul
Wed Aug 11 03:34:19 CDT 2004

Hi Sietse,

Thanx for checking it out,
Well, i've tried it with the PRG (didn't work), but check this out now...

include a messagebox to be displayed in the Click event of the header.

Now run the form (don't change anything in the form), compile the
MyHeader.prg file.
You shouldn't see it.

If u still do see a messagebox, then try to change some other stuff in the
header - esp alignment, font size...

It won't work.

Regards,
Paul

"Sietse Wijnker" <sietse.wijnker@ATsw-software.nl> wrote in message
news:uEzmnu3fEHA.3016@tk2msftngp13.phx.gbl...
> Repost of my message in the grids-group (now with proper formatting ;-)):
> Hi Paul,
>
> From the VFP Help on the HeaderClass property:
> Column.HeaderClass [ = cClassName ]
>
> cClassName
> Specifies the name of a member class in a program (.prg) file.
>
> In your code you're referring to an fxp.
> I've tried your example without any trouble, but i used the prg-file to
> refer to in the Memberclass property of the column. When I changed it to
> point to the fxp, it indeed showed the same symptoms you're referring to.
>
> HTH,
> Sietse Wijnker
>
> "Devapriya De Silva" <ddesilva@qa-software.com> wrote in message
> news:%23cSrES1fEHA.636@TK2MSFTNGP12.phx.gbl...
> > Hi Paul,
> >
> > You are not doing anything wrong I guess.
> > This is the default behavior of it.
> > i.e.
> > Changing MemberClass and MemberClassLibrary affects only newly created
> > member objects, not existing member objects in the container.
> >
> > This is documented under the memberclass property help found in the
visual
> > foxpro language reference.
> >
> > The other option is for you to build the grid dynamically in your visual
> > class.
> > Kind Regards,
> > Devapriya De Silva
> >
> > "Paul Wilson" <paul@thisisadummyemailaddress.com> wrote in message
> > news:uqNTuw0fEHA.720@TK2MSFTNGP11.phx.gbl...
> > > I'm trying to use the Member class feature of VFP 8 to create classes
> for
> > > 1). Grid class (which uses the Member class feature for mapping
Columns)
> > > 2). Column class in a PRG (which uses the HeaderClass for mapping
Header
> > > class)
> > > 3). Header class in a PRG (for the Column Class).
> > >
> > > I've created a Visual class for the Grid, & have set the Member Class
&
> > > Class Library properties of the grid
> > > for the Column class (in the PRG).
> > > The contents of the PRG (for the Column & Header classes is as
follows)
> > >
> > > DEFINE CLASS uColumn AS Column
> > > HeaderClassLibrary = 'F:\MyHeader.FXP'
> > > HeaderClass = 'oHeader'
> > > ENDDEFINE
> > >
> > > && Below is the code from MyHeader.PRG
> > >
> > > DEFINE CLASS oHeader AS Header
> > > Alignment = 2
> > > FontSize = 8
> > > Caption = "Header"
> > > Name = "Header"
> > > ENDDEFINE
> > >
> > > When i drop the Grid class on a form & use it, its all fine,
> > > The caption of the Header is Center Aligned.
> > > But, if i go & change this Alignment of the Header caption to Left (0)
> in
> > > the MyHeader.PRG & compile it,
> > > then the changes are NOT reflected in the GRID (form).
> > >
> > > The changes APPEAR ONLY IF, i change the column count in the Grid (on
> the
> > > form) to a greater value, & run the form again.
> > > Ie, I HAVE TO REFRESH the GRID to retrive the Column class from the
PRG
> > once
> > > again, which in turn refreshes its setting
> > > for the HEADER CLASS from the HeaderClass & HeaderClassLibrary.
> > >
> > > Am i doing something wrong here.
> > > Cuz, if this is how it works, then I'll have to modify ALL my forms,
> when
> > > ever i make a change to the Header Class in the PRG.
> > >
> > > Best Regards,
> > >
> > > Paul
> > >
> > >
> >
> >
>
>



Re: using member classes in VFP 8 for grid columns & headers by Sietse

Sietse
Wed Aug 11 04:01:21 CDT 2004

Hi Paul,
Are you sure you're pointing to the correct class-file?
I see you'resetting the HeaderClassLibrary property to 'F:\MyHeader.FXP'. Is
the header class in that location?

I've tried what you said without any problems:

Simple form with grdTest grid (Visually designed):
DEFINE CLASS grdtest AS grid
MemberClassLibrary = "member.prg"
MemberClass = "mycol"
Height = 200
Width = 320
Name = "grdtest"
Themes=.F.
ENDDEFINE

Member.prg:
*- Memberclasses
DEFINE CLASS mycol AS Column
HeaderClassLibrary = 'headercls.prg'
HeaderClass = 'myHdr'
ENDDEFINE

Headercls.prg:
*- Memberclasses
DEFINE CLASS myHdr AS Header
Alignment = 2
ForeColor=RGB(0,255,0)
BackColor=RGB(255,255,255)
FontSize=20
PROCEDURE Click()
MESSAGEBOX(PROGRAM())
ENDPROC
ENDDEFINE


"Paul Wilson" <paul@thisisadummyemailaddress.com> wrote in message
news:OQPS$33fEHA.2352@TK2MSFTNGP09.phx.gbl...
> Hi Sietse,
>
> Thanx for checking it out,
> Well, i've tried it with the PRG (didn't work), but check this out now...
>
> include a messagebox to be displayed in the Click event of the header.
>
> Now run the form (don't change anything in the form), compile the
> MyHeader.prg file.
> You shouldn't see it.
>
> If u still do see a messagebox, then try to change some other stuff in the
> header - esp alignment, font size...
>
> It won't work.
>
> Regards,
> Paul
>
> "Sietse Wijnker" <sietse.wijnker@ATsw-software.nl> wrote in message
> news:uEzmnu3fEHA.3016@tk2msftngp13.phx.gbl...
> > Repost of my message in the grids-group (now with proper formatting
;-)):
> > Hi Paul,
> >
> > From the VFP Help on the HeaderClass property:
> > Column.HeaderClass [ = cClassName ]
> >
> > cClassName
> > Specifies the name of a member class in a program (.prg) file.
> >
> > In your code you're referring to an fxp.
> > I've tried your example without any trouble, but i used the prg-file to
> > refer to in the Memberclass property of the column. When I changed it to
> > point to the fxp, it indeed showed the same symptoms you're referring
to.
> >
> > HTH,
> > Sietse Wijnker
> >
> > "Devapriya De Silva" <ddesilva@qa-software.com> wrote in message
> > news:%23cSrES1fEHA.636@TK2MSFTNGP12.phx.gbl...
> > > Hi Paul,
> > >
> > > You are not doing anything wrong I guess.
> > > This is the default behavior of it.
> > > i.e.
> > > Changing MemberClass and MemberClassLibrary affects only newly created
> > > member objects, not existing member objects in the container.
> > >
> > > This is documented under the memberclass property help found in the
> visual
> > > foxpro language reference.
> > >
> > > The other option is for you to build the grid dynamically in your
visual
> > > class.
> > > Kind Regards,
> > > Devapriya De Silva
> > >
> > > "Paul Wilson" <paul@thisisadummyemailaddress.com> wrote in message
> > > news:uqNTuw0fEHA.720@TK2MSFTNGP11.phx.gbl...
> > > > I'm trying to use the Member class feature of VFP 8 to create
classes
> > for
> > > > 1). Grid class (which uses the Member class feature for mapping
> Columns)
> > > > 2). Column class in a PRG (which uses the HeaderClass for mapping
> Header
> > > > class)
> > > > 3). Header class in a PRG (for the Column Class).
> > > >
> > > > I've created a Visual class for the Grid, & have set the Member
Class
> &
> > > > Class Library properties of the grid
> > > > for the Column class (in the PRG).
> > > > The contents of the PRG (for the Column & Header classes is as
> follows)
> > > >
> > > > DEFINE CLASS uColumn AS Column
> > > > HeaderClassLibrary = 'F:\MyHeader.FXP'
> > > > HeaderClass = 'oHeader'
> > > > ENDDEFINE
> > > >
> > > > && Below is the code from MyHeader.PRG
> > > >
> > > > DEFINE CLASS oHeader AS Header
> > > > Alignment = 2
> > > > FontSize = 8
> > > > Caption = "Header"
> > > > Name = "Header"
> > > > ENDDEFINE
> > > >
> > > > When i drop the Grid class on a form & use it, its all fine,
> > > > The caption of the Header is Center Aligned.
> > > > But, if i go & change this Alignment of the Header caption to Left
(0)
> > in
> > > > the MyHeader.PRG & compile it,
> > > > then the changes are NOT reflected in the GRID (form).
> > > >
> > > > The changes APPEAR ONLY IF, i change the column count in the Grid
(on
> > the
> > > > form) to a greater value, & run the form again.
> > > > Ie, I HAVE TO REFRESH the GRID to retrive the Column class from the
> PRG
> > > once
> > > > again, which in turn refreshes its setting
> > > > for the HEADER CLASS from the HeaderClass & HeaderClassLibrary.
> > > >
> > > > Am i doing something wrong here.
> > > > Cuz, if this is how it works, then I'll have to modify ALL my forms,
> > when
> > > > ever i make a change to the Header Class in the PRG.
> > > >
> > > > Best Regards,
> > > >
> > > > Paul
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Re: using member classes in VFP 8 for grid columns & headers by Paul

Paul
Wed Aug 11 04:29:37 CDT 2004

I have attached herewith a zip with the form & class file (program).
Please check it out.

Run the form & check the alignment of the header caption.
Next, modify the MyHeader.prg & change the alignment & the compile it & run
the form again.
Try this out at least 2 times.

You Should face a problem.

Regards,
Paul

"Sietse Wijnker" <sietse.wijnker@ATsw-software.nl> wrote in message
news:%23Y2OfH4fEHA.3428@TK2MSFTNGP11.phx.gbl...
> Hi Paul,
> Are you sure you're pointing to the correct class-file?
> I see you'resetting the HeaderClassLibrary property to 'F:\MyHeader.FXP'.
Is
> the header class in that location?
>
> I've tried what you said without any problems:
>
> Simple form with grdTest grid (Visually designed):
> DEFINE CLASS grdtest AS grid
> MemberClassLibrary = "member.prg"
> MemberClass = "mycol"
> Height = 200
> Width = 320
> Name = "grdtest"
> Themes=.F.
> ENDDEFINE
>
> Member.prg:
> *- Memberclasses
> DEFINE CLASS mycol AS Column
> HeaderClassLibrary = 'headercls.prg'
> HeaderClass = 'myHdr'
> ENDDEFINE
>
> Headercls.prg:
> *- Memberclasses
> DEFINE CLASS myHdr AS Header
> Alignment = 2
> ForeColor=RGB(0,255,0)
> BackColor=RGB(255,255,255)
> FontSize=20
> PROCEDURE Click()
> MESSAGEBOX(PROGRAM())
> ENDPROC
> ENDDEFINE
>
>
> "Paul Wilson" <paul@thisisadummyemailaddress.com> wrote in message
> news:OQPS$33fEHA.2352@TK2MSFTNGP09.phx.gbl...
> > Hi Sietse,
> >
> > Thanx for checking it out,
> > Well, i've tried it with the PRG (didn't work), but check this out
now...
> >
> > include a messagebox to be displayed in the Click event of the header.
> >
> > Now run the form (don't change anything in the form), compile the
> > MyHeader.prg file.
> > You shouldn't see it.
> >
> > If u still do see a messagebox, then try to change some other stuff in
the
> > header - esp alignment, font size...
> >
> > It won't work.
> >
> > Regards,
> > Paul
> >
> > "Sietse Wijnker" <sietse.wijnker@ATsw-software.nl> wrote in message
> > news:uEzmnu3fEHA.3016@tk2msftngp13.phx.gbl...
> > > Repost of my message in the grids-group (now with proper formatting
> ;-)):
> > > Hi Paul,
> > >
> > > From the VFP Help on the HeaderClass property:
> > > Column.HeaderClass [ = cClassName ]
> > >
> > > cClassName
> > > Specifies the name of a member class in a program (.prg) file.
> > >
> > > In your code you're referring to an fxp.
> > > I've tried your example without any trouble, but i used the prg-file
to
> > > refer to in the Memberclass property of the column. When I changed it
to
> > > point to the fxp, it indeed showed the same symptoms you're referring
> to.
> > >
> > > HTH,
> > > Sietse Wijnker
> > >
> > > "Devapriya De Silva" <ddesilva@qa-software.com> wrote in message
> > > news:%23cSrES1fEHA.636@TK2MSFTNGP12.phx.gbl...
> > > > Hi Paul,
> > > >
> > > > You are not doing anything wrong I guess.
> > > > This is the default behavior of it.
> > > > i.e.
> > > > Changing MemberClass and MemberClassLibrary affects only newly
created
> > > > member objects, not existing member objects in the container.
> > > >
> > > > This is documented under the memberclass property help found in the
> > visual
> > > > foxpro language reference.
> > > >
> > > > The other option is for you to build the grid dynamically in your
> visual
> > > > class.
> > > > Kind Regards,
> > > > Devapriya De Silva
> > > >
> > > > "Paul Wilson" <paul@thisisadummyemailaddress.com> wrote in message
> > > > news:uqNTuw0fEHA.720@TK2MSFTNGP11.phx.gbl...
> > > > > I'm trying to use the Member class feature of VFP 8 to create
> classes
> > > for
> > > > > 1). Grid class (which uses the Member class feature for mapping
> > Columns)
> > > > > 2). Column class in a PRG (which uses the HeaderClass for mapping
> > Header
> > > > > class)
> > > > > 3). Header class in a PRG (for the Column Class).
> > > > >
> > > > > I've created a Visual class for the Grid, & have set the Member
> Class
> > &
> > > > > Class Library properties of the grid
> > > > > for the Column class (in the PRG).
> > > > > The contents of the PRG (for the Column & Header classes is as
> > follows)
> > > > >
> > > > > DEFINE CLASS uColumn AS Column
> > > > > HeaderClassLibrary = 'F:\MyHeader.FXP'
> > > > > HeaderClass = 'oHeader'
> > > > > ENDDEFINE
> > > > >
> > > > > && Below is the code from MyHeader.PRG
> > > > >
> > > > > DEFINE CLASS oHeader AS Header
> > > > > Alignment = 2
> > > > > FontSize = 8
> > > > > Caption = "Header"
> > > > > Name = "Header"
> > > > > ENDDEFINE
> > > > >
> > > > > When i drop the Grid class on a form & use it, its all fine,
> > > > > The caption of the Header is Center Aligned.
> > > > > But, if i go & change this Alignment of the Header caption to Left
> (0)
> > > in
> > > > > the MyHeader.PRG & compile it,
> > > > > then the changes are NOT reflected in the GRID (form).
> > > > >
> > > > > The changes APPEAR ONLY IF, i change the column count in the Grid
> (on
> > > the
> > > > > form) to a greater value, & run the form again.
> > > > > Ie, I HAVE TO REFRESH the GRID to retrive the Column class from
the
> > PRG
> > > > once
> > > > > again, which in turn refreshes its setting
> > > > > for the HEADER CLASS from the HeaderClass & HeaderClassLibrary.
> > > > >
> > > > > Am i doing something wrong here.
> > > > > Cuz, if this is how it works, then I'll have to modify ALL my
forms,
> > > when
> > > > > ever i make a change to the Header Class in the PRG.
> > > > >
> > > > > Best Regards,
> > > > >
> > > > > Paul
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>


begin 666 Grid Problems.zip
M4$L#!!0````(`&)["S$IWE4?RP```#H!```:````1W)I9"!0<F]B;&5M<R]M
M>4AE861E<BY"04M5CK$*PC 0AN<4^@Y'E^KBX*;@4)-4A=J*07!PB1HDF":2
MMH,^O=?&H4*&R\=_]W^,Y[N2`RTR(:"CSG2UA4Q F.*(;)6\*T^-;)I"7[WT
M;R K("E=7C9>W^'@W=6HNKGLWR$Z>_E'&D<`XU7 [[#F`L0`+QD;RN,HCMA8
MXY?I-<*$&IG1#ULKV^(5(',DN;.MT!\UZ"P04/EJM;,P@"1L)LA+6:M?_8CB
M.QPKRMGIB+U&WYY(R)X+D6WXNCI/,&N,2Z:(4;7/PI_T%U!+`P04````" !O
M>PLQI'1:3VD!```S`@``&@```$=R:60@4')O8FQE;7,O;7E(96%D97(N1EA0
M;5(]3\)0%#VO?(E((LAD8B0F#AHU03>B0RT(3: 0BH.FBT)%8FM)E03BSW!R
ME,5_8.+/<&3P!^CH(HFT>ML"P>![.7WGGGMSW\WILS]_DAP#L,P!;T0.\-^Z
M?V;@L$XL0]BANEO"`G&%3OTNDEHE/O3!AV,@@1@>AD(_@+RJ:<9'Q[)=/0!!
M:]:NMJB4T>:QB>H7L#C\7H&05G)FLYXLF\:YINHW2K&;5\_JJKG3,AN6G:!*
MYE2&8'BZVY-#'/DLG\E6A (ORP7QL,)73B+36A'1T2T#QBP[.FHT8&'+7J*
MHZ ?Q+BI(_G^2O/HO</QR+G1CS#X@IB3BEFI.H>CDE25Q=-L" )?KHHER0^)
M+U+8%@RMK5\'X9VR:^-D^''S%U?>1XSMXI'C60JOM%,LQ7K8F_D+S@Q1^JR-
MO/<1DH3.*!<D/!&VF<=K::7A>-H:>PJ]>^F9>M%IS:8G6;(<V(#W(IP5GYKE
M%U!+`P04````" !M>PLQ&5#ZF,L````Z`0``&@```$=R:60@4')O8FQE;7,O
M;7E(96%D97(N4%)'58ZQ"L(P$(;G%/H.1Y?J(C@J.-0D5:&V8A <7*(&"::)
MI.V@3^^U<:B0X?+QW_T?X_FNY$"+3 CHJ#-=;2$3$*8X(ELE[\I3(YNFT%<O
M_1O("DA*EY>-UW<X>'<UJFXN^W>(SE[^D<81P'@5\#NLN0`QP$O&AO(XBB,V
MUOAE>HTPH49F],/6RK9X!<@<2>YL*_1'#3H+!%2^6NTL#" )FPGR4M;J5S^B
M^ ['BG)V.F*OT;<G$K+G0F0;OJ[.$\P:XY(I8E3ML_ G_0502P,$% ````@`
M=GL+,5 \<_N+`0``:@8``!H```!'<FED(%!R;V)L96US+W1E<W1G<FED+E-#
M5.U2T4[",!0=B4"R9-$8/V#RO"RL<T8??)"A8C(P$=#P6%@9TVTEI3/P@?Z7
MM]OJD"S1!WG2+DW.N;<]ISVKHC1>%$6I*?_CKP[Q[X^>;AZ']P\#_4K7==ML
MMXOZH8\Y)LE;R&@2DX1_4^Y6EB<CN@3AMJ9Z9,YS]!SZ?)'#'@F#15$6`D.:
MLAD!;@[&GF=JZ@#'@K9VU%N:6AC4K%UP,*<LKL#U6\!RD=VE+B.89UXC,'+Q
MDH<T$5[9NE;I+;G4#%CH5^#Z'6"I_\7LO4_B*6%NA%<K+YPRS#:@&V\6!/N$
MF4L6:.K6$N&9NC1*XP1<<^#2-!$YH:W,K OK,U9TIJEYU/9YF;"-G/(:V?%
M<#S+%"U3-F2A[*'='BJOW\A/7<F:O8S)>Y]D(9B9L2E=BMZQ="BVE 9-3M9\
M2M?5M#X"^A.#28<R$![R343R!];'+ B3',-&`LE2)J@!GZ9V\.Q5EI#C&,4L
M`\R<?RT(M.\@I,'>@SB]9B&.#-BN7QJZ8^B6F,B YP<3ZNH'4$L#!!0````(
M`'9["S&%!X-DUP$``-X'```:````1W)I9"!0<F]B;&5M<R]T97-T9W)I9"YS
M8WCME+]/VT 4QP\2$#_$Q(*0*IF!H4,5DX3$D6"XV!?%P<_GV&="*R$$408&
M.G3HVG^A:Z>N3*P,2$Q(K&PL'1CY![KS'%\(.)=+JC+RI*_?BS_OWO=L^6+F
M%Y87"2$+^3.2C=D<(8%'18.'@#_MF:0OTQ/[;CMFKI/P9,Y2A@L76"0H!(3X
MJPIN>S2*TA(^X"6OXAZW$[ZAX'4:,3D#-A6<UUL^!9:4\%'!`QHR7_1+^*3B
M(0]8*%P6$=A2<\%LP? %P+:"`Q--[O2?$&H*CONSN9/N;[?/7W=PCPU*H$2Q
MWF/%`6<*'K*(A?O,P;V#J^$X!$##2\C;&EY&'FLXOAOXK.$5Y(<:7D5^K.$6
M\IZ"QXAE":<*OD+>(PG#Y@!X$HRH^ZW7^VJ\BHFK7\;LY!:CX_H.[T3&T5;=
M- ],OV495K%HE;9KU>J:'%# W)#UH6;HM62W8WI&S6JI6<6T*G=RT1_,C[+^
M.\43C(M1,_IL5C)S:=,.YB8J1IWD] -UD3$K'[3XT*P@O_1=S'NH+ZCOV:__
M'V+4+!B:_92#?V.^0%VA[M_4K#TTL^;2I@9F@>JB?LSI!^IBU"P<FOV2@\\Q
M7Z)N4 __8S8X9X,_KDGGC,ZK[DX7ZT]02P,$"@``````=GL+,0``````````
M``````X```!'<FED(%!R;V)L96US+U!+`0(4`!0````(`&)["S$IWE4?RP``
M`#H!```:``````````$`( ````````!'<FED(%!R;V)L96US+VUY2&5A9&5R
M+D)!2U!+`0(4`!0````(`&]["S&D=%I/:0$``#,"```:````````````( ``
M``,!``!'<FED(%!R;V)L96US+VUY2&5A9&5R+D984%!+`0(4`!0````(`&U[
M"S$94/J8RP```#H!```:``````````$`( ```*0"``!'<FED(%!R;V)L96US
M+VUY2&5A9&5R+E!21U!+`0(4`!0````(`'9["S%0/'/[BP$``&H&```:````
M``````$`( ```*<#``!'<FED(%!R;V)L96US+W1E<W1G<FED+E-#5%!+`0(4
M`!0````(`'9["S&%!X-DUP$``-X'```:``````````$`( ```&H%``!'<FED
M(%!R;V)L96US+W1E<W1G<FED+G-C>%!+`0(4``H``````'9["S$`````````
M```````.````````````$ ```'D'``!'<FED(%!R;V)L96US+U!+!08`````
.!@`&`*0!``"E!P``````
`
end


Re: using member classes in VFP 8 for grid columns & headers by Sietse

Sietse
Wed Aug 11 04:49:31 CDT 2004

Hi Paul,
The problem you're seing is caused by a mismatch between your class
definition and the forms definition
In the form you've placed a grid and set the columncount to 2
The moment you did so, the form uses the memberclass property of the grid to
find out which column-class to use for the additional columns. Each column
in its turn looks at the Headerclass property to look which header to use.
At the time you did set the columncount to 2 for your form, the header class
either wasn't set or couldn't be found (due to the fxp setting perhaps?) so
the default header class (baseclass) wass added.
So when you change anything to the oHeader subclass, changes won't be
reflected to the form, because the headers there aren't based on that class.
To solve your problem, set the columncount of your grid back to 0, and then
reset it to 2. The header based on your custom header class will be added.

HTH,
Sietse Wijnker

"Paul Wilson" <paul@thisisadummyemailaddress.com> wrote in message
news:edWg6W4fEHA.3320@TK2MSFTNGP11.phx.gbl...
> I have attached herewith a zip with the form & class file (program).
> Please check it out.
>
> Run the form & check the alignment of the header caption.
> Next, modify the MyHeader.prg & change the alignment & the compile it &
run
> the form again.
> Try this out at least 2 times.
>
> You Should face a problem.
>
> Regards,
> Paul
>
> "Sietse Wijnker" <sietse.wijnker@ATsw-software.nl> wrote in message
> news:%23Y2OfH4fEHA.3428@TK2MSFTNGP11.phx.gbl...
> > Hi Paul,
> > Are you sure you're pointing to the correct class-file?
> > I see you'resetting the HeaderClassLibrary property to
'F:\MyHeader.FXP'.
> Is
> > the header class in that location?
> >
> > I've tried what you said without any problems:
> >
> > Simple form with grdTest grid (Visually designed):
> > DEFINE CLASS grdtest AS grid
> > MemberClassLibrary = "member.prg"
> > MemberClass = "mycol"
> > Height = 200
> > Width = 320
> > Name = "grdtest"
> > Themes=.F.
> > ENDDEFINE
> >
> > Member.prg:
> > *- Memberclasses
> > DEFINE CLASS mycol AS Column
> > HeaderClassLibrary = 'headercls.prg'
> > HeaderClass = 'myHdr'
> > ENDDEFINE
> >
> > Headercls.prg:
> > *- Memberclasses
> > DEFINE CLASS myHdr AS Header
> > Alignment = 2
> > ForeColor=RGB(0,255,0)
> > BackColor=RGB(255,255,255)
> > FontSize=20
> > PROCEDURE Click()
> > MESSAGEBOX(PROGRAM())
> > ENDPROC
> > ENDDEFINE
> >
> >
> > "Paul Wilson" <paul@thisisadummyemailaddress.com> wrote in message
> > news:OQPS$33fEHA.2352@TK2MSFTNGP09.phx.gbl...
> > > Hi Sietse,
> > >
> > > Thanx for checking it out,
> > > Well, i've tried it with the PRG (didn't work), but check this out
> now...
> > >
> > > include a messagebox to be displayed in the Click event of the header.
> > >
> > > Now run the form (don't change anything in the form), compile the
> > > MyHeader.prg file.
> > > You shouldn't see it.
> > >
> > > If u still do see a messagebox, then try to change some other stuff in
> the
> > > header - esp alignment, font size...
> > >
> > > It won't work.
> > >
> > > Regards,
> > > Paul
> > >
> > > "Sietse Wijnker" <sietse.wijnker@ATsw-software.nl> wrote in message
> > > news:uEzmnu3fEHA.3016@tk2msftngp13.phx.gbl...
> > > > Repost of my message in the grids-group (now with proper formatting
> > ;-)):
> > > > Hi Paul,
> > > >
> > > > From the VFP Help on the HeaderClass property:
> > > > Column.HeaderClass [ = cClassName ]
> > > >
> > > > cClassName
> > > > Specifies the name of a member class in a program (.prg) file.
> > > >
> > > > In your code you're referring to an fxp.
> > > > I've tried your example without any trouble, but i used the prg-file
> to
> > > > refer to in the Memberclass property of the column. When I changed
it
> to
> > > > point to the fxp, it indeed showed the same symptoms you're
referring
> > to.
> > > >
> > > > HTH,
> > > > Sietse Wijnker
> > > >
> > > > "Devapriya De Silva" <ddesilva@qa-software.com> wrote in message
> > > > news:%23cSrES1fEHA.636@TK2MSFTNGP12.phx.gbl...
> > > > > Hi Paul,
> > > > >
> > > > > You are not doing anything wrong I guess.
> > > > > This is the default behavior of it.
> > > > > i.e.
> > > > > Changing MemberClass and MemberClassLibrary affects only newly
> created
> > > > > member objects, not existing member objects in the container.
> > > > >
> > > > > This is documented under the memberclass property help found in
the
> > > visual
> > > > > foxpro language reference.
> > > > >
> > > > > The other option is for you to build the grid dynamically in your
> > visual
> > > > > class.
> > > > > Kind Regards,
> > > > > Devapriya De Silva
> > > > >
> > > > > "Paul Wilson" <paul@thisisadummyemailaddress.com> wrote in message
> > > > > news:uqNTuw0fEHA.720@TK2MSFTNGP11.phx.gbl...
> > > > > > I'm trying to use the Member class feature of VFP 8 to create
> > classes
> > > > for
> > > > > > 1). Grid class (which uses the Member class feature for mapping
> > > Columns)
> > > > > > 2). Column class in a PRG (which uses the HeaderClass for
mapping
> > > Header
> > > > > > class)
> > > > > > 3). Header class in a PRG (for the Column Class).
> > > > > >
> > > > > > I've created a Visual class for the Grid, & have set the Member
> > Class
> > > &
> > > > > > Class Library properties of the grid
> > > > > > for the Column class (in the PRG).
> > > > > > The contents of the PRG (for the Column & Header classes is as
> > > follows)
> > > > > >
> > > > > > DEFINE CLASS uColumn AS Column
> > > > > > HeaderClassLibrary = 'F:\MyHeader.FXP'
> > > > > > HeaderClass = 'oHeader'
> > > > > > ENDDEFINE
> > > > > >
> > > > > > && Below is the code from MyHeader.PRG
> > > > > >
> > > > > > DEFINE CLASS oHeader AS Header
> > > > > > Alignment = 2
> > > > > > FontSize = 8
> > > > > > Caption = "Header"
> > > > > > Name = "Header"
> > > > > > ENDDEFINE
> > > > > >
> > > > > > When i drop the Grid class on a form & use it, its all fine,
> > > > > > The caption of the Header is Center Aligned.
> > > > > > But, if i go & change this Alignment of the Header caption to
Left
> > (0)
> > > > in
> > > > > > the MyHeader.PRG & compile it,
> > > > > > then the changes are NOT reflected in the GRID (form).
> > > > > >
> > > > > > The changes APPEAR ONLY IF, i change the column count in the
Grid
> > (on
> > > > the
> > > > > > form) to a greater value, & run the form again.
> > > > > > Ie, I HAVE TO REFRESH the GRID to retrive the Column class from
> the
> > > PRG
> > > > > once
> > > > > > again, which in turn refreshes its setting
> > > > > > for the HEADER CLASS from the HeaderClass & HeaderClassLibrary.
> > > > > >
> > > > > > Am i doing something wrong here.
> > > > > > Cuz, if this is how it works, then I'll have to modify ALL my
> forms,
> > > > when
> > > > > > ever i make a change to the Header Class in the PRG.
> > > > > >
> > > > > > Best Regards,
> > > > > >
> > > > > > Paul
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
>



Re: using member classes in VFP 8 for grid columns & headers by Paul

Paul
Wed Aug 11 05:04:13 CDT 2004

Just what i didn't want to do.
This means, that when ever i make any change to the header class, i'll have
to reset the column count of the grid.
& this wouild have to be done for ALL grids in ALL forms of my application -
cumbersome.

Also, i did set the column count to 0, before setting the header class of
the grid, & then set it to 2,
in which case the headers & columsn were generated from my class.

Thanx for your help,

Regards,
Paul

"Sietse Wijnker" <sietse.wijnker@ATsw-software.nl> wrote in message
news:eqYgai4fEHA.2848@TK2MSFTNGP10.phx.gbl...
> Hi Paul,
> The problem you're seing is caused by a mismatch between your class
> definition and the forms definition
> In the form you've placed a grid and set the columncount to 2
> The moment you did so, the form uses the memberclass property of the grid
to
> find out which column-class to use for the additional columns. Each column
> in its turn looks at the Headerclass property to look which header to use.
> At the time you did set the columncount to 2 for your form, the header
class
> either wasn't set or couldn't be found (due to the fxp setting perhaps?)
so
> the default header class (baseclass) wass added.
> So when you change anything to the oHeader subclass, changes won't be
> reflected to the form, because the headers there aren't based on that
class.
> To solve your problem, set the columncount of your grid back to 0, and
then
> reset it to 2. The header based on your custom header class will be added.
>
> HTH,
> Sietse Wijnker
>
> "Paul Wilson" <paul@thisisadummyemailaddress.com> wrote in message
> news:edWg6W4fEHA.3320@TK2MSFTNGP11.phx.gbl...
> > I have attached herewith a zip with the form & class file (program).
> > Please check it out.
> >
> > Run the form & check the alignment of the header caption.
> > Next, modify the MyHeader.prg & change the alignment & the compile it &
> run
> > the form again.
> > Try this out at least 2 times.
> >
> > You Should face a problem.
> >
> > Regards,
> > Paul
> >
> > "Sietse Wijnker" <sietse.wijnker@ATsw-software.nl> wrote in message
> > news:%23Y2OfH4fEHA.3428@TK2MSFTNGP11.phx.gbl...
> > > Hi Paul,
> > > Are you sure you're pointing to the correct class-file?
> > > I see you'resetting the HeaderClassLibrary property to
> 'F:\MyHeader.FXP'.
> > Is
> > > the header class in that location?
> > >
> > > I've tried what you said without any problems:
> > >
> > > Simple form with grdTest grid (Visually designed):
> > > DEFINE CLASS grdtest AS grid
> > > MemberClassLibrary = "member.prg"
> > > MemberClass = "mycol"
> > > Height = 200
> > > Width = 320
> > > Name = "grdtest"
> > > Themes=.F.
> > > ENDDEFINE
> > >
> > > Member.prg:
> > > *- Memberclasses
> > > DEFINE CLASS mycol AS Column
> > > HeaderClassLibrary = 'headercls.prg'
> > > HeaderClass = 'myHdr'
> > > ENDDEFINE
> > >
> > > Headercls.prg:
> > > *- Memberclasses
> > > DEFINE CLASS myHdr AS Header
> > > Alignment = 2
> > > ForeColor=RGB(0,255,0)
> > > BackColor=RGB(255,255,255)
> > > FontSize=20
> > > PROCEDURE Click()
> > > MESSAGEBOX(PROGRAM())
> > > ENDPROC
> > > ENDDEFINE
> > >
> > >
> > > "Paul Wilson" <paul@thisisadummyemailaddress.com> wrote in message
> > > news:OQPS$33fEHA.2352@TK2MSFTNGP09.phx.gbl...
> > > > Hi Sietse,
> > > >
> > > > Thanx for checking it out,
> > > > Well, i've tried it with the PRG (didn't work), but check this out
> > now...
> > > >
> > > > include a messagebox to be displayed in the Click event of the
header.
> > > >
> > > > Now run the form (don't change anything in the form), compile the
> > > > MyHeader.prg file.
> > > > You shouldn't see it.
> > > >
> > > > If u still do see a messagebox, then try to change some other stuff
in
> > the
> > > > header - esp alignment, font size...
> > > >
> > > > It won't work.
> > > >
> > > > Regards,
> > > > Paul
> > > >
> > > > "Sietse Wijnker" <sietse.wijnker@ATsw-software.nl> wrote in message
> > > > news:uEzmnu3fEHA.3016@tk2msftngp13.phx.gbl...
> > > > > Repost of my message in the grids-group (now with proper
formatting
> > > ;-)):
> > > > > Hi Paul,
> > > > >
> > > > > From the VFP Help on the HeaderClass property:
> > > > > Column.HeaderClass [ = cClassName ]
> > > > >
> > > > > cClassName
> > > > > Specifies the name of a member class in a program (.prg) file.
> > > > >
> > > > > In your code you're referring to an fxp.
> > > > > I've tried your example without any trouble, but i used the
prg-file
> > to
> > > > > refer to in the Memberclass property of the column. When I changed
> it
> > to
> > > > > point to the fxp, it indeed showed the same symptoms you're
> referring
> > > to.
> > > > >
> > > > > HTH,
> > > > > Sietse Wijnker
> > > > >
> > > > > "Devapriya De Silva" <ddesilva@qa-software.com> wrote in message
> > > > > news:%23cSrES1fEHA.636@TK2MSFTNGP12.phx.gbl...
> > > > > > Hi Paul,
> > > > > >
> > > > > > You are not doing anything wrong I guess.
> > > > > > This is the default behavior of it.
> > > > > > i.e.
> > > > > > Changing MemberClass and MemberClassLibrary affects only newly
> > created
> > > > > > member objects, not existing member objects in the container.
> > > > > >
> > > > > > This is documented under the memberclass property help found in
> the
> > > > visual
> > > > > > foxpro language reference.
> > > > > >
> > > > > > The other option is for you to build the grid dynamically in
your
> > > visual
> > > > > > class.
> > > > > > Kind Regards,
> > > > > > Devapriya De Silva
> > > > > >
> > > > > > "Paul Wilson" <paul@thisisadummyemailaddress.com> wrote in
message
> > > > > > news:uqNTuw0fEHA.720@TK2MSFTNGP11.phx.gbl...
> > > > > > > I'm trying to use the Member class feature of VFP 8 to create
> > > classes
> > > > > for
> > > > > > > 1). Grid class (which uses the Member class feature for
mapping
> > > > Columns)
> > > > > > > 2). Column class in a PRG (which uses the HeaderClass for
> mapping
> > > > Header
> > > > > > > class)
> > > > > > > 3). Header class in a PRG (for the Column Class).
> > > > > > >
> > > > > > > I've created a Visual class for the Grid, & have set the
Member
> > > Class
> > > > &
> > > > > > > Class Library properties of the grid
> > > > > > > for the Column class (in the PRG).
> > > > > > > The contents of the PRG (for the Column & Header classes is as
> > > > follows)
> > > > > > >
> > > > > > > DEFINE CLASS uColumn AS Column
> > > > > > > HeaderClassLibrary = 'F:\MyHeader.FXP'
> > > > > > > HeaderClass = 'oHeader'
> > > > > > > ENDDEFINE
> > > > > > >
> > > > > > > && Below is the code from MyHeader.PRG
> > > > > > >
> > > > > > > DEFINE CLASS oHeader AS Header
> > > > > > > Alignment = 2
> > > > > > > FontSize = 8
> > > > > > > Caption = "Header"
> > > > > > > Name = "Header"
> > > > > > > ENDDEFINE
> > > > > > >
> > > > > > > When i drop the Grid class on a form & use it, its all fine,
> > > > > > > The caption of the Header is Center Aligned.
> > > > > > > But, if i go & change this Alignment of the Header caption to
> Left
> > > (0)
> > > > > in
> > > > > > > the MyHeader.PRG & compile it,
> > > > > > > then the changes are NOT reflected in the GRID (form).
> > > > > > >
> > > > > > > The changes APPEAR ONLY IF, i change the column count in the
> Grid
> > > (on
> > > > > the
> > > > > > > form) to a greater value, & run the form again.
> > > > > > > Ie, I HAVE TO REFRESH the GRID to retrive the Column class
from
> > the
> > > > PRG
> > > > > > once
> > > > > > > again, which in turn refreshes its setting
> > > > > > > for the HEADER CLASS from the HeaderClass &
HeaderClassLibrary.
> > > > > > >
> > > > > > > Am i doing something wrong here.
> > > > > > > Cuz, if this is how it works, then I'll have to modify ALL my
> > forms,
> > > > > when
> > > > > > > ever i make a change to the Header Class in the PRG.
> > > > > > >
> > > > > > > Best Regards,
> > > > > > >
> > > > > > > Paul
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
> >
>
>



Re: using member classes in VFP 8 for grid columns & headers by Sietse

Sietse
Wed Aug 11 05:10:32 CDT 2004

Hi Paul,
The action I mentioned should only be performed once. As soon as the form
uses the correct header class, each class modification is reflected to the
form (unless it's overruled in the form itself).

> Also, i did set the column count to 0, before setting the header class of
> the grid, & then set it to 2,
> in which case the headers & columsn were generated from my class.
My guess is that the column-class couldn't find the header-class when you
did that, so it added the VFP base class

Sietse

"Paul Wilson" <paul@thisisadummyemailaddress.com> wrote in message
news:e0cLOq4fEHA.2764@TK2MSFTNGP11.phx.gbl...
> Just what i didn't want to do.
> This means, that when ever i make any change to the header class, i'll
have
> to reset the column count of the grid.
> & this wouild have to be done for ALL grids in ALL forms of my
application -
> cumbersome.
>
> Also, i did set the column count to 0, before setting the header class of
> the grid, & then set it to 2,
> in which case the headers & columsn were generated from my class.
>
> Thanx for your help,
>
> Regards,
> Paul
>
> "Sietse Wijnker" <sietse.wijnker@ATsw-software.nl> wrote in message
> news:eqYgai4fEHA.2848@TK2MSFTNGP10.phx.gbl...
> > Hi Paul,
> > The problem you're seing is caused by a mismatch between your class
> > definition and the forms definition
> > In the form you've placed a grid and set the columncount to 2
> > The moment you did so, the form uses the memberclass property of the
grid
> to
> > find out which column-class to use for the additional columns. Each
column
> > in its turn looks at the Headerclass property to look which header to
use.
> > At the time you did set the columncount to 2 for your form, the header
> class
> > either wasn't set or couldn't be found (due to the fxp setting perhaps?)
> so
> > the default header class (baseclass) wass added.
> > So when you change anything to the oHeader subclass, changes won't be
> > reflected to the form, because the headers there aren't based on that
> class.
> > To solve your problem, set the columncount of your grid back to 0, and
> then
> > reset it to 2. The header based on your custom header class will be
added.
> >
> > HTH,
> > Sietse Wijnker
> >
> > "Paul Wilson" <paul@thisisadummyemailaddress.com> wrote in message
> > news:edWg6W4fEHA.3320@TK2MSFTNGP11.phx.gbl...
> > > I have attached herewith a zip with the form & class file (program).
> > > Please check it out.
> > >
> > > Run the form & check the alignment of the header caption.
> > > Next, modify the MyHeader.prg & change the alignment & the compile it
&
> > run
> > > the form again.
> > > Try this out at least 2 times.
> > >
> > > You Should face a problem.
> > >
> > > Regards,
> > > Paul
> > >
> > > "Sietse Wijnker" <sietse.wijnker@ATsw-software.nl> wrote in message
> > > news:%23Y2OfH4fEHA.3428@TK2MSFTNGP11.phx.gbl...
> > > > Hi Paul,
> > > > Are you sure you're pointing to the correct class-file?
> > > > I see you'resetting the HeaderClassLibrary property to
> > 'F:\MyHeader.FXP'.
> > > Is
> > > > the header class in that location?
> > > >
> > > > I've tried what you said without any problems:
> > > >
> > > > Simple form with grdTest grid (Visually designed):
> > > > DEFINE CLASS grdtest AS grid
> > > > MemberClassLibrary = "member.prg"
> > > > MemberClass = "mycol"
> > > > Height = 200
> > > > Width = 320
> > > > Name = "grdtest"
> > > > Themes=.F.
> > > > ENDDEFINE
> > > >
> > > > Member.prg:
> > > > *- Memberclasses
> > > > DEFINE CLASS mycol AS Column
> > > > HeaderClassLibrary = 'headercls.prg'
> > > > HeaderClass = 'myHdr'
> > > > ENDDEFINE
> > > >
> > > > Headercls.prg:
> > > > *- Memberclasses
> > > > DEFINE CLASS myHdr AS Header
> > > > Alignment = 2
> > > > ForeColor=RGB(0,255,0)
> > > > BackColor=RGB(255,255,255)
> > > > FontSize=20
> > > > PROCEDURE Click()
> > > > MESSAGEBOX(PROGRAM())
> > > > ENDPROC
> > > > ENDDEFINE
> > > >
> > > >
> > > > "Paul Wilson" <paul@thisisadummyemailaddress.com> wrote in message
> > > > news:OQPS$33fEHA.2352@TK2MSFTNGP09.phx.gbl...
> > > > > Hi Sietse,
> > > > >
> > > > > Thanx for checking it out,
> > > > > Well, i've tried it with the PRG (didn't work), but check this out
> > > now...
> > > > >
> > > > > include a messagebox to be displayed in the Click event of the
> header.
> > > > >
> > > > > Now run the form (don't change anything in the form), compile the
> > > > > MyHeader.prg file.
> > > > > You shouldn't see it.
> > > > >
> > > > > If u still do see a messagebox, then try to change some other
stuff
> in
> > > the
> > > > > header - esp alignment, font size...
> > > > >
> > > > > It won't work.
> > > > >
> > > > > Regards,
> > > > > Paul
> > > > >
> > > > > "Sietse Wijnker" <sietse.wijnker@ATsw-software.nl> wrote in
message
> > > > > news:uEzmnu3fEHA.3016@tk2msftngp13.phx.gbl...
> > > > > > Repost of my message in the grids-group (now with proper
> formatting
> > > > ;-)):
> > > > > > Hi Paul,
> > > > > >
> > > > > > From the VFP Help on the HeaderClass property:
> > > > > > Column.HeaderClass [ = cClassName ]
> > > > > >
> > > > > > cClassName
> > > > > > Specifies the name of a member class in a program (.prg) file.
> > > > > >
> > > > > > In your code you're referring to an fxp.
> > > > > > I've tried your example without any trouble, but i used the
> prg-file
> > > to
> > > > > > refer to in the Memberclass property of the column. When I
changed
> > it
> > > to
> > > > > > point to the fxp, it indeed showed the same symptoms you're
> > referring
> > > > to.
> > > > > >
> > > > > > HTH,
> > > > > > Sietse Wijnker
> > > > > >
> > > > > > "Devapriya De Silva" <ddesilva@qa-software.com> wrote in message
> > > > > > news:%23cSrES1fEHA.636@TK2MSFTNGP12.phx.gbl...
> > > > > > > Hi Paul,
> > > > > > >
> > > > > > > You are not doing anything wrong I guess.
> > > > > > > This is the default behavior of it.
> > > > > > > i.e.
> > > > > > > Changing MemberClass and MemberClassLibrary affects only newly
> > > created
> > > > > > > member objects, not existing member objects in the container.
> > > > > > >
> > > > > > > This is documented under the memberclass property help found
in
> > the
> > > > > visual
> > > > > > > foxpro language reference.
> > > > > > >
> > > > > > > The other option is for you to build the grid dynamically in
> your
> > > > visual
> > > > > > > class.
> > > > > > > Kind Regards,
> > > > > > > Devapriya De Silva
> > > > > > >
> > > > > > > "Paul Wilson" <paul@thisisadummyemailaddress.com> wrote in
> message
> > > > > > > news:uqNTuw0fEHA.720@TK2MSFTNGP11.phx.gbl...
> > > > > > > > I'm trying to use the Member class feature of VFP 8 to
create
> > > > classes
> > > > > > for
> > > > > > > > 1). Grid class (which uses the Member class feature for
> mapping
> > > > > Columns)
> > > > > > > > 2). Column class in a PRG (which uses the HeaderClass for
> > mapping
> > > > > Header
> > > > > > > > class)
> > > > > > > > 3). Header class in a PRG (for the Column Class).
> > > > > > > >
> > > > > > > > I've created a Visual class for the Grid, & have set the
> Member
> > > > Class
> > > > > &
> > > > > > > > Class Library properties of the grid
> > > > > > > > for the Column class (in the PRG).
> > > > > > > > The contents of the PRG (for the Column & Header classes is
as
> > > > > follows)
> > > > > > > >
> > > > > > > > DEFINE CLASS uColumn AS Column
> > > > > > > > HeaderClassLibrary = 'F:\MyHeader.FXP'
> > > > > > > > HeaderClass = 'oHeader'
> > > > > > > > ENDDEFINE
> > > > > > > >
> > > > > > > > && Below is the code from MyHeader.PRG
> > > > > > > >
> > > > > > > > DEFINE CLASS oHeader AS Header
> > > > > > > > Alignment = 2
> > > > > > > > FontSize = 8
> > > > > > > > Caption = "Header"
> > > > > > > > Name = "Header"
> > > > > > > > ENDDEFINE
> > > > > > > >
> > > > > > > > When i drop the Grid class on a form & use it, its all fine,
> > > > > > > > The caption of the Header is Center Aligned.
> > > > > > > > But, if i go & change this Alignment of the Header caption
to
> > Left
> > > > (0)
> > > > > > in
> > > > > > > > the MyHeader.PRG & compile it,
> > > > > > > > then the changes are NOT reflected in the GRID (form).
> > > > > > > >
> > > > > > > > The changes APPEAR ONLY IF, i change the column count in the
> > Grid
> > > > (on
> > > > > > the
> > > > > > > > form) to a greater value, & run the form again.
> > > > > > > > Ie, I HAVE TO REFRESH the GRID to retrive the Column class
> from
> > > the
> > > > > PRG
> > > > > > > once
> > > > > > > > again, which in turn refreshes its setting
> > > > > > > > for the HEADER CLASS from the HeaderClass &
> HeaderClassLibrary.
> > > > > > > >
> > > > > > > > Am i doing something wrong here.
> > > > > > > > Cuz, if this is how it works, then I'll have to modify ALL
my
> > > forms,
> > > > > > when
> > > > > > > > ever i make a change to the Header Class in the PRG.
> > > > > > > >
> > > > > > > > Best Regards,
> > > > > > > >
> > > > > > > > Paul
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> > >
> >
> >
>
>



Re: using member classes in VFP 8 for grid columns & headers by Paul

Paul
Thu Aug 12 03:01:37 CDT 2004

Thanx for your help on this one, i've been fretting on this for a while now.
Thanx again,

Regards,
Paul

"Sietse Wijnker" <sietse.wijnker@ATsw-software.nl> wrote in message
news:ervpKu4fEHA.2020@TK2MSFTNGP10.phx.gbl...
> Hi Paul,
> The action I mentioned should only be performed once. As soon as the form
> uses the correct header class, each class modification is reflected to the
> form (unless it's overruled in the form itself).
>
> > Also, i did set the column count to 0, before setting the header class
of
> > the grid, & then set it to 2,
> > in which case the headers & columsn were generated from my class.
> My guess is that the column-class couldn't find the header-class when you
> did that, so it added the VFP base class
>
> Sietse
>
> "Paul Wilson" <paul@thisisadummyemailaddress.com> wrote in message
> news:e0cLOq4fEHA.2764@TK2MSFTNGP11.phx.gbl...
> > Just what i didn't want to do.
> > This means, that when ever i make any change to the header class, i'll
> have
> > to reset the column count of the grid.
> > & this wouild have to be done for ALL grids in ALL forms of my
> application -
> > cumbersome.
> >
> > Also, i did set the column count to 0, before setting the header class
of
> > the grid, & then set it to 2,
> > in which case the headers & columsn were generated from my class.
> >
> > Thanx for your help,
> >
> > Regards,
> > Paul
> >
> > "Sietse Wijnker" <sietse.wijnker@ATsw-software.nl> wrote in message
> > news:eqYgai4fEHA.2848@TK2MSFTNGP10.phx.gbl...
> > > Hi Paul,
> > > The problem you're seing is caused by a mismatch between your class
> > > definition and the forms definition
> > > In the form you've placed a grid and set the columncount to 2
> > > The moment you did so, the form uses the memberclass property of the
> grid
> > to
> > > find out which column-class to use for the additional columns. Each
> column
> > > in its turn looks at the Headerclass property to look which header to
> use.
> > > At the time you did set the columncount to 2 for your form, the header
> > class
> > > either wasn't set or couldn't be found (due to the fxp setting
perhaps?)
> > so
> > > the default header class (baseclass) wass added.
> > > So when you change anything to the oHeader subclass, changes won't be
> > > reflected to the form, because the headers there aren't based on that
> > class.
> > > To solve your problem, set the columncount of your grid back to 0, and
> > then
> > > reset it to 2. The header based on your custom header class will be
> added.
> > >
> > > HTH,
> > > Sietse Wijnker
> > >
> > > "Paul Wilson" <paul@thisisadummyemailaddress.com> wrote in message
> > > news:edWg6W4fEHA.3320@TK2MSFTNGP11.phx.gbl...
> > > > I have attached herewith a zip with the form & class file (program).
> > > > Please check it out.
> > > >
> > > > Run the form & check the alignment of the header caption.
> > > > Next, modify the MyHeader.prg & change the alignment & the compile
it
> &
> > > run
> > > > the form again.
> > > > Try this out at least 2 times.
> > > >
> > > > You Should face a problem.
> > > >
> > > > Regards,
> > > > Paul
> > > >
> > > > "Sietse Wijnker" <sietse.wijnker@ATsw-software.nl> wrote in message
> > > > news:%23Y2OfH4fEHA.3428@TK2MSFTNGP11.phx.gbl...
> > > > > Hi Paul,
> > > > > Are you sure you're pointing to the correct class-file?
> > > > > I see you'resetting the HeaderClassLibrary property to
> > > 'F:\MyHeader.FXP'.
> > > > Is
> > > > > the header class in that location?
> > > &g