mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-27 11:53:45 +02:00
LCL, dbgrid fix row in call to DrawCellText in DefaultDrawColumnCell
git-svn-id: trunk@23526 -
This commit is contained in:
parent
af1c9d6799
commit
594efdb34c
@ -2862,11 +2862,16 @@ procedure TCustomDBGrid.DefaultDrawColumnCell(const Rect: TRect;
|
|||||||
var
|
var
|
||||||
S: string;
|
S: string;
|
||||||
F: TField;
|
F: TField;
|
||||||
|
DataRow: Integer;
|
||||||
begin
|
begin
|
||||||
|
|
||||||
F := Column.Field;
|
F := Column.Field;
|
||||||
|
|
||||||
DataCol := GridColumnFromColumnIndex(DataCol);
|
DataCol := GridColumnFromColumnIndex(DataCol);
|
||||||
|
if FDataLink.Active then
|
||||||
|
DataRow := FixedRows + FDataLink.ActiveRecord
|
||||||
|
else
|
||||||
|
DataRow := 0;
|
||||||
|
|
||||||
if DataCol>=FirstGridColumn then
|
if DataCol>=FirstGridColumn then
|
||||||
case ColumnEditorStyle(DataCol, F) of
|
case ColumnEditorStyle(DataCol, F) of
|
||||||
@ -2882,7 +2887,7 @@ begin
|
|||||||
S := '(blob)';
|
S := '(blob)';
|
||||||
end else
|
end else
|
||||||
S := '';
|
S := '';
|
||||||
DrawCellText(DataCol, 0, Rect, State, S);
|
DrawCellText(DataCol, DataRow, Rect, State, S);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user