You've already forked lazarus-ccr
fpspreadsheet: Set default col/row headers of TsWorksheetGrid immediately after adding to form.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3881 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -144,6 +144,7 @@ type
|
||||
out ACol1, ACol2: Integer; var ARect: TRect): Boolean;
|
||||
procedure CreateNewWorkbook;
|
||||
procedure DblClick; override;
|
||||
procedure DoOnResize; override;
|
||||
procedure DoPrepareCanvas(ACol, ARow: Integer; AState: TGridDrawState); override;
|
||||
procedure DrawAllRows; override;
|
||||
procedure DrawCellBorders; overload;
|
||||
@ -1138,6 +1139,13 @@ begin
|
||||
inherited DblClick;
|
||||
end;
|
||||
|
||||
procedure TsCustomWorksheetGrid.DoOnResize;
|
||||
begin
|
||||
if (csDesigning in ComponentState) and (Worksheet = nil) then
|
||||
NewWorkbook(FInitColCount, FInitRowCount);
|
||||
inherited;
|
||||
end;
|
||||
|
||||
{@@ ----------------------------------------------------------------------------
|
||||
Adjusts the grid's canvas before painting a given cell. Considers
|
||||
background color, horizontal alignment, vertical alignment, etc.
|
||||
@ -2912,6 +2920,7 @@ procedure TsCustomWorksheetGrid.Loaded;
|
||||
begin
|
||||
inherited;
|
||||
if FWorkbookSource = nil then
|
||||
// CreateNewWorkbook;
|
||||
NewWorkbook(FInitColCount, FInitRowCount);
|
||||
end;
|
||||
|
||||
|
Reference in New Issue
Block a user