Subject | Re: [IBO] IB_Grid line color |
---|---|
Author | C.Stahlberger |
Post date | 2006-03-16T15:25:01Z |
Hi,
try it this way:
procedure TFormStockReport.Grid1GetCellProps(Sender: TObject; ACol,
ARow: Integer; AState: TGridDrawState; var AColor: TColor;
const AFont: TFont);
begin
if dsCB.Active then
begin
with dsCB.DataSet do
begin
BufferRowNum := Grid1.DataRow[ ARow ];
if BufferRowNum > 0 then
begin
if AFont.Color <> clHighlightText then
begin
AFont.Color := clWindowText;
if ( Fettdruck(
BufferFieldByName('EINGANG').AsDate ) ) OR
( Fettdruck(
BufferFieldByName('AUSGANG').AsDate ) ) then
begin
AFont.Color := clBlue;
AFont.Style := [fsBold];
end;
end;
end;
end;
end;
end;
Grettings Christian
try it this way:
procedure TFormStockReport.Grid1GetCellProps(Sender: TObject; ACol,
ARow: Integer; AState: TGridDrawState; var AColor: TColor;
const AFont: TFont);
begin
if dsCB.Active then
begin
with dsCB.DataSet do
begin
BufferRowNum := Grid1.DataRow[ ARow ];
if BufferRowNum > 0 then
begin
if AFont.Color <> clHighlightText then
begin
AFont.Color := clWindowText;
if ( Fettdruck(
BufferFieldByName('EINGANG').AsDate ) ) OR
( Fettdruck(
BufferFieldByName('AUSGANG').AsDate ) ) then
begin
AFont.Color := clBlue;
AFont.Style := [fsBold];
end;
end;
end;
end;
end;
end;
Grettings Christian
----- Original Message -----
From: "pazeder" <eder.firebird@...>
To: <IBObjects@yahoogroups.com>
Sent: Thursday, March 16, 2006 3:02 PM
Subject: [IBO] IB_Grid line color
Hi !!
I need to color the Tib_grid, but i can't.
I tried to use the same method for the delphi Tdbgrid components,
but its not working because i think it's missing something
the method im using is:
-- portuguese--
estou precisando colorir uma lihna da TIB_Grid, porem não estou
conseguindo. Tentei ultilizar o mesmo metodo para o componente
Tdbgrid do delphi mas não funciona, acredito que por falta de algum
evento, o metodo que ultilizo para a Tdbgrid é este
--------------------------------------------------------------------
Procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect:
TRect;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
if iboquery1.FieldByName('vencimento').AsDateTime < date
then begin
dbgrid1.canvas.Brush.Color:=$002EC9FC;
dbgrid1.DefaultDrawDataCell(Rect,dbgrid1.Columns
[datacol].Field,State);
end;
end;
--------------------------------------------------------------------
Thanks for your help.
obrigado pela ajuda
Eder Paz
+55(19)3935-6731
eder.firebird@...
___________________________________________________________________________
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 !
Yahoo! Groups Links