Subject | Re: [IBO] Question about TIB_Grid.OnDrawCell |
---|---|
Author | ronald_greven |
Post date | 2003-11-05T13:38:30Z |
Many thanks to Riho and Thomas for the really very fast help.
Best greetings
Ronni
--- In IBObjects@yahoogroups.com, "Riho-Rene Ellermaa"
<r.ellermaa@h...> wrote:
Best greetings
Ronni
--- In IBObjects@yahoogroups.com, "Riho-Rene Ellermaa"
<r.ellermaa@h...> wrote:
> THat is how I do itACol,
>
> //Colors grid rows according to statuses
> void __fastcall TFMaster::GridGetCellProps(TObject *Sender, int
> int ARow, TGridDrawState AState, TColor &AColor, TFont *AFont)("Colors","Sent",clBlue);
> {
> if ( !ACol || !ARow ) return;
> 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
> else if(stat==16)
> AFont->Color =
> Common.IniFile->ReadInteger("Colors","Archived",clTeal);
> else
> AFont->Color = clWindowText;
> }
>
> }
>
>
>
> Riho Ellermaa
>
>
>
>
>
>
>
> [Non-text portions of this message have been removed]