Subject Re: [IBO] TIB_Grid .. Conditional Font Color
Author Andreas Pohl
Maybe this helps:

procedure TForm1.IB_Grid1GetCellProps(Sender: TObject; ACol,
ARow: Integer; AState: TGridDrawState; var AColor: TColor;
const AFont: TFont);
begin
if ib_datasource1.Active and (arow>0) and (acol>0) then begin // prevent
fixed area
with ib_datasource1.DataSet do begin
BufferRowNum := ib_grid1.DataRow[ ARow ];
if (BufferRowNum > 0) then begin
if BufferFieldByName('TITLE').AsInteger=1 then begin // check
field
if (arow<>RowNum) then acolor:=$00FFECB9; // only change color
if not current row...
afont.Style:=[fsBold];
// bold
end;
end;
end;
end;
end;

Mit freundlichem Gruss & Best Regards

Andreas Pohl
apohl@...
www.ibp-consult.com
----- Original Message -----
From: <mikehome@...>
To: <IBObjects@yahoogroups.com>
Sent: Wednesday, July 11, 2001 1:49 PM
Subject: [IBO] TIB_Grid .. Conditional Font Color


> Hi,
> Can someone advise how I can change a grids cell font if value is
> lees than 0 i.e red if negative blue if positive.
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>