mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 13:59:31 +02:00
LCL, fix dgTitles dbgrid option after emtpy grid, from Paul Ishenin, issue #15172
git-svn-id: trunk@22756 -
This commit is contained in:
parent
44b0233a93
commit
aa050e518f
@ -718,14 +718,15 @@ end;
|
||||
|
||||
procedure TCustomDBGrid.EmptyGrid;
|
||||
var
|
||||
OldFixedCols: Integer;
|
||||
OldFixedCols, OldFixedRows: Integer;
|
||||
begin
|
||||
OldFixedCols := FixedCols;
|
||||
OldFixedRows := FixedRows;
|
||||
Clear;
|
||||
ColCount := OldFixedCols + 1;
|
||||
RowCount := 2;
|
||||
RowCount := OldFixedRows + 1;
|
||||
FixedCols := OldFixedCols;
|
||||
FixedRows := 1;
|
||||
FixedRows := OldFixedRows;
|
||||
if dgIndicator in Options then
|
||||
ColWidths[0]:=12;
|
||||
end;
|
||||
@ -1003,6 +1004,13 @@ begin
|
||||
FixedCols := FixedCols - 1;
|
||||
end;
|
||||
|
||||
if (dgTitles in ChangedOptions) then begin
|
||||
if dgTitles in FOptions then
|
||||
FixedRows := FixedRows + 1
|
||||
else
|
||||
FixedRows := FixedRows - 1;
|
||||
end;
|
||||
|
||||
if (dgAutoSizeColumns in ChangedOptions) then begin
|
||||
Exclude(FGridStatus, gsAutoSized);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user