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:
Ae galera porque este comando nao esta dando certo :? :cry:
Fred
Curtir tópico
+ 0
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!
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!
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
Clique aqui para fazer login e interagir na Comunidade :)