mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 02:49:19 +02:00
parent
de653426c7
commit
753c843f12
@ -505,7 +505,6 @@ type
|
|||||||
procedure SelectEditor; override;
|
procedure SelectEditor; override;
|
||||||
procedure SetEditText(ACol, ARow: Longint; const Value: string); override;
|
procedure SetEditText(ACol, ARow: Longint; const Value: string); override;
|
||||||
procedure SetFixedCols(const AValue: Integer); override;
|
procedure SetFixedCols(const AValue: Integer); override;
|
||||||
function SelectCell(aCol, aRow: Integer): boolean; override;
|
|
||||||
procedure UnprepareCellHints; override;
|
procedure UnprepareCellHints; override;
|
||||||
procedure UpdateActive; virtual;
|
procedure UpdateActive; virtual;
|
||||||
procedure UpdateAutoSizeColumns;
|
procedure UpdateAutoSizeColumns;
|
||||||
@ -2958,11 +2957,6 @@ begin
|
|||||||
inherited SetFixedCols(AValue);
|
inherited SetFixedCols(AValue);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCustomDBGrid.SelectCell(aCol, aRow: Integer): boolean;
|
|
||||||
begin
|
|
||||||
Result:= (ColWidths[aCol] > 0) and (RowHeights[aRow] > 0);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TCustomDBGrid.BeginLayout;
|
procedure TCustomDBGrid.BeginLayout;
|
||||||
begin
|
begin
|
||||||
inc(FLayoutChangedCount);
|
inc(FLayoutChangedCount);
|
||||||
|
@ -2594,12 +2594,12 @@ end;
|
|||||||
|
|
||||||
function TCustomGrid.IsColumnIndexVariable(AIndex: Integer): boolean;
|
function TCustomGrid.IsColumnIndexVariable(AIndex: Integer): boolean;
|
||||||
begin
|
begin
|
||||||
Result := (FFixedCols>0) and (AIndex>=FFixedCols) and (AIndex<ColCount);
|
Result := (AIndex>=FFixedCols) and (AIndex<ColCount);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCustomGrid.IsRowIndexVariable(AIndex: Integer): boolean;
|
function TCustomGrid.IsRowIndexVariable(AIndex: Integer): boolean;
|
||||||
begin
|
begin
|
||||||
Result := (FFixedRows>0) and (AIndex>=FFixedRows) and (AIndex<RowCount);
|
Result := (AIndex>=FFixedRows) and (AIndex<RowCount);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCustomGrid.GetColWidths(Acol: Integer): Integer;
|
function TCustomGrid.GetColWidths(Acol: Integer): Integer;
|
||||||
@ -4093,8 +4093,7 @@ end;
|
|||||||
|
|
||||||
function TCustomGrid.SelectCell(ACol, ARow: Integer): Boolean;
|
function TCustomGrid.SelectCell(ACol, ARow: Integer): Boolean;
|
||||||
begin
|
begin
|
||||||
Result:=true;
|
Result := (ColWidths[aCol] > 0) and (RowHeights[aRow] > 0);
|
||||||
//Result:=MoveExtend(False, aCol, aRow);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomGrid.SetCanvasFont(aFont: TFont);
|
procedure TCustomGrid.SetCanvasFont(aFont: TFont);
|
||||||
@ -7876,7 +7875,9 @@ begin
|
|||||||
|
|
||||||
// Calculate
|
// Calculate
|
||||||
Result:=False;
|
Result:=False;
|
||||||
while not SelectCell(NCol,NRow) do begin
|
while ((ColWidths[NCol]=0) and (CInc<>0))
|
||||||
|
or ((RowHeights[NRow]=0) and (RInc<>0)) do
|
||||||
|
begin
|
||||||
if not (IsRowIndexVariable(NRow+RInc) and IsColumnIndexVariable(NCol+CInc)) then
|
if not (IsRowIndexVariable(NRow+RInc) and IsColumnIndexVariable(NCol+CInc)) then
|
||||||
Exit;
|
Exit;
|
||||||
Inc(NCol, CInc);
|
Inc(NCol, CInc);
|
||||||
@ -10887,8 +10888,9 @@ end;
|
|||||||
|
|
||||||
function TCustomDrawGrid.SelectCell(aCol, aRow: Integer): boolean;
|
function TCustomDrawGrid.SelectCell(aCol, aRow: Integer): boolean;
|
||||||
begin
|
begin
|
||||||
Result:= (ColWidths[aCol] > 0) and (RowHeights[aRow] > 0);
|
Result := inherited SelectCell(aCol, aRow);
|
||||||
if Assigned(OnSelectCell) then OnSelectCell(Self, aCol, aRow, Result);
|
if Assigned(OnSelectCell) then
|
||||||
|
OnSelectCell(Self, aCol, aRow, Result);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomDrawGrid.SetColor(Value: TColor);
|
procedure TCustomDrawGrid.SetColor(Value: TColor);
|
||||||
|
Loading…
Reference in New Issue
Block a user