Subject Grid titles get colored: Jason has a fix?
Author Mack
Dear Jason:

I have the same problem you stated in this email that you had a fix
for. Could you explain how you fixed it. I am using ongetcellprops,
which is causing the problem somehow. It also changes the font,
style, fontcolor, and fontsize, as well as the background color of
the grid titles.

jf

From: "Jason Wharton" <jwharton@...>
Date: Fri Jan 11, 2002 10:24 am
Subject: Re: [IBO] Another Grid behaviour kylixguru
Offline
Send Email

I noticed a similar problem introduced into some of my sample apps. I
fixed
them, rather than the grid. You can fix this in your code too. There
isn't
anything I can do to fix IBO internally that I know of. See sample
apps,
masterlinks and keylinks for an example.

Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: "Riho-Rene Ellermaa" <r.ellermaa@...>
To: "IBObject (E-mail)" <IBObjects@yahoogroups.com>
Sent: Friday, January 11, 2002 6:57 AM
Subject: [IBO] Another Grid behaviour


> I use following snippet to color the rows in grid according to row
> status. It worked OK in IBO 3.
> In IBO4 also the column titles get colored. For example when I have
> black text in top rows and blue below, then when scrolling down the
> title rows changes to blue
>
> void __fastcall TFMaster::GridGetCellProps(TObject *Sender, int
ACol,
> int ARow, TGridDrawState AState, TColor &AColor, TFont *AFont)
> {
> if(DSource && DSource->Dataset && DSource->Dataset->Active)
> { int BufferRowNum = Grid->DataRow[ ARow ];
> DSource->Dataset->BufferRowNum = BufferRowNum;
> int stat =
> DSource->Dataset->BufferFieldByName("STATUS")->AsInteger;
> if(stat==1)
> AFont->Color =
> Common.IniFile->ReadInteger("Colors","Prepared",clBlack);
> else if(stat==3)
> AFont->Color =
> Common.IniFile->ReadInteger("Colors","Waiting2",clOlive);
> else if(stat==2)
> AFont->Color =
> Common.IniFile->ReadInteger("Colors","Accepted",clGreen);
> else if(stat==4)
> AFont->Color =
> Common.IniFile->ReadInteger("Colors","Rejected",clRed);
> else if(stat==8)
> AFont->Color =
> Common.IniFile->ReadInteger("Colors","Sent",clBlue);
> else if(stat==16)
> AFont->Color =
> Common.IniFile->ReadInteger("Colors","Archived",clTeal);
> else
> AFont->Color = clWindowText;
> }
> }
>
> Riho-Rene Ellermaa
> senior programmer
> Hansabank
>
>
>
______________________________________________________________________
_____
> IB Objects - direct, complete, custom connectivity to Firebird or
InterBase
> without the need for BDE, ODBC or any other layer.
>
______________________________________________________________________
_____
> http://www.ibobjects.com - your IBO community resource for Tech Info
papers,
> keyword-searchable FAQ, community code contributions and more !
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
>
>
>