From f431c3e138a872ce647bc6d3b6f0acf487e942db Mon Sep 17 00:00:00 2001 From: jesus Date: Tue, 20 Mar 2012 18:49:22 +0000 Subject: [PATCH] LCL, fix dbgrid fixed cells drawing on DefaultDrawing=false, issue #21496 git-svn-id: trunk@36180 - --- lcl/dbgrids.pas | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lcl/dbgrids.pas b/lcl/dbgrids.pas index 2696d3045e..c415b3c926 100644 --- a/lcl/dbgrids.pas +++ b/lcl/dbgrids.pas @@ -2369,6 +2369,14 @@ procedure TCustomDBGrid.PrepareCanvas(aCol, aRow: Integer; aState: TGridDrawState); begin inherited PrepareCanvas(aCol, aRow, aState); + + if gdFixed in aState then begin + if gdHot in aState then + Canvas.Brush.Color := FixedHotColor + else + Canvas.Brush.Color := GetColumnColor(aCol, gdFixed in AState); + end; + if (not FDatalink.Active) and ((gdSelected in aState) or (gdFocused in aState)) then Canvas.Brush.Color := Self.Color; end; @@ -2746,7 +2754,7 @@ begin if gdFixed in aState then DbgOut('F'); {$endif dbgGridPaint} - if DefaultDrawing then + if (gdFixed in aState) or DefaultDrawing then DefaultDrawCell(aCol, aRow, aRect, aState); if (ARow>=FixedRows) and Assigned(OnDrawColumnCell) and