RxFPC: RxDBVerticalGrid fix row higth on show/hide column title

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6009 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2017-08-24 12:02:25 +00:00
parent 6a67ea6b6d
commit 2b449147e7
4 changed files with 182 additions and 126 deletions

View File

@ -292,6 +292,7 @@ type
procedure SetRows(AValue: TRxDBVerticalGridRows);
procedure RecordChanged;
procedure RowsChanged(aRow: TRxDBVerticalGridRow);
procedure UpdateRowsHight;
protected
procedure OutCaptionCellText(aCol, aRow: integer; const aRect: TRect;
aState: TGridDrawState; const ACaption: string);
@ -1181,6 +1182,19 @@ begin
end;
end;
procedure TRxCustomDBVerticalGrid.UpdateRowsHight;
var
R: TRxDBVerticalGridRow;
i: Integer;
begin
for R in Rows do
RowHeights[R.Index + FixedRows]:=R.RowHeight;
if FixedRows > 0 then
for i:=0 to FixedRows-1 do
RowHeights[i]:=DefaultRowHeight;
end;
procedure TRxCustomDBVerticalGrid.OutCaptionCellText(aCol, aRow: integer;
const aRect: TRect; aState: TGridDrawState; const ACaption: string);
begin
@ -1596,6 +1610,8 @@ begin
RowCount:=RowCount - 1;
FixedRows:=0;
end;
UpdateRowsHight;
end;
function TRxCustomDBVerticalGrid.GetDataSource: TDataSource;