DbGrid1.canvas.Font.color:=clred; Não Funciona??
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
Curtidas 0
Respostas
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!
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
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!
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