RxDBGrid - fix draw last row with active footer rows

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2693 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2013-03-03 09:35:53 +00:00
parent a36e138253
commit c70a742cf7

View File

@ -586,7 +586,7 @@ type
procedure UpdateActive; override;
procedure UpdateData; override;
procedure MoveSelection; override;
//function GetBufferCount: integer; override;
function GetBufferCount: integer; override;
procedure CMHintShow(var Message: TLMessage); message CM_HINTSHOW;
procedure FFilterListEditorOnChange(Sender: TObject);
procedure FFilterListEditorOnCloseUp(Sender: TObject);
@ -1909,10 +1909,14 @@ begin
if rdgFilter in OptionsRx then
begin
if Assigned(FFilterListEditor) then
begin
RowHeights[0] := RowHeights[0] + FFilterListEditor.Height
end
else
begin
RowHeights[0] := RowHeights[0] + DefaultRowHeight;
end;
end;
finally
if TmpCanvas <> Canvas then
@ -2726,7 +2730,7 @@ begin
inherited DrawCell(aCol, aRow, aRect, aState);
end;
procedure TRxDBGrid.LinkActive(Value: boolean);
procedure TRxDBGrid.LinkActive(Value: Boolean);
var
S: string;
Pos: integer;
@ -3402,6 +3406,17 @@ begin
// UpdateRowsHeight;
end;
function TRxDBGrid.GetBufferCount: integer;
begin
Result := ClientHeight div DefaultRowHeight;
if dgTitles in Options then
begin
Dec(Result, RowHeights[0] div DefaultRowHeight);
end;
if FFooterOptions.Active then
Dec(Result, FFooterOptions.RowCount);
end;
procedure TRxDBGrid.CMHintShow(var Message: TLMessage);
var
Cell: TGridCoord;