I'm painting the lines of a
I'm painting the lines of a
Do as follows:
procedure TFrmCadLicenca.dbgTerminaisDrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
inherited;
if cdsTerminal.IsEmpty then exit;
if cdsTerminalAcess_TerE.AsString <> 'S' then
begin
if (gdSelected in State) and dbgTerminais.Focused then
begin
dbgTerminais.Canvas.Brush.Color := clRed;
dbgTerminais.Canvas.Font.Color := clWhite;
dbgTerminais.DefaultDrawDataCell(Rect, Column.Field, State);
end
else
begin
dbgTerminais.Canvas.Brush.Color := clMaroon;
dbgTerminais.Canvas.Font.Color := clWhite;
dbgTerminais.DefaultDrawDataCell(Rect, Column.Field, State);
end;
end;
end;
I would advise testing with and
additional, dbgTerminais.Focused
.