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

20/03/2003

0

DbGrid1.canvas.Font.color:=clred;

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


Fred

Fred

Responder

Posts

21/03/2003

Anonymous

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!


Responder

21/03/2003

Anonymous

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!


Responder

Assista grátis a nossa aula inaugural

Assitir aula

Saiba por que programar é uma questão de
sobrevivência e como aprender sem riscos

Assistir agora

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar