DbGrid1.canvas.Font.color:=clred; Não Funciona??

Delphi

20/03/2003

DbGrid1.canvas.Font.color:=clred;

Ae galera porque este comando nao esta dando certo :? :cry:


Fred

Fred

Curtidas 0

Respostas

Anonymous

Anonymous

20/03/2003

no evento DrawColumnCell do DBGrid coloque:

procedure TForm1.DBGrid1DrawColumnCell(
Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn;
State: TGridDrawState);
begin

if condição then
begin
DBGrid1.Canvas.Font.Color := clRed;
DBGrid1.DefaultDrawDataCell(Rect, Column.Field, State);
end
else
begin
DBGridConsApelido.Canvas.Font.Color := clFuchsia;
DBGridConsApelido.DefaultDrawDataCell(Rect, Column.Field, State);

end;

Um abraço!


GOSTEI 0
Anonymous

Anonymous

20/03/2003

no evento DrawColumnCell do DBGrid coloque:

procedure TForm1.DBGrid1DrawColumnCell(
Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn;
State: TGridDrawState);
begin

if condição then
begin
DBGrid1.Canvas.Font.Color := clRed;
DBGrid1.DefaultDrawDataCell(Rect, Column.Field, State);
end
else
begin
DBGrid1.Canvas.Font.Color := clFuchsia;
DBGrid1.DefaultDrawDataCell(Rect, Column.Field, State);

end;

Um abraço!


GOSTEI 0
POSTAR