You've already forked lazarus-ccr
fpspreadsheet: Introduce new property FrozenPaneBorderColor of the TsWorksheetGrid
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5853 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -121,6 +121,7 @@ type
|
|||||||
FOldEditorText: String;
|
FOldEditorText: String;
|
||||||
FMultilineStringEditor: TMultilineStringCellEditor;
|
FMultilineStringEditor: TMultilineStringCellEditor;
|
||||||
FLineMode: TsEditorLineMode;
|
FLineMode: TsEditorLineMode;
|
||||||
|
FFrozenPaneBorderColor: TColor;
|
||||||
function CalcAutoRowHeight(ARow: Integer): Integer;
|
function CalcAutoRowHeight(ARow: Integer): Integer;
|
||||||
function CalcColWidthFromSheet(AWidth: Single): Integer;
|
function CalcColWidthFromSheet(AWidth: Single): Integer;
|
||||||
function CalcRowHeightFromSheet(AHeight: Single): Integer;
|
function CalcRowHeightFromSheet(AHeight: Single): Integer;
|
||||||
@ -201,6 +202,7 @@ type
|
|||||||
procedure SetDefRowHeight(AValue: Integer);
|
procedure SetDefRowHeight(AValue: Integer);
|
||||||
procedure SetEditorLineMode(AValue: TsEditorLineMode);
|
procedure SetEditorLineMode(AValue: TsEditorLineMode);
|
||||||
procedure SetFrozenCols(AValue: Integer);
|
procedure SetFrozenCols(AValue: Integer);
|
||||||
|
procedure SetFrozenPaneBorderColor(AValue: TColor);
|
||||||
procedure SetFrozenRows(AValue: Integer);
|
procedure SetFrozenRows(AValue: Integer);
|
||||||
procedure SetHorAlignment(ACol, ARow: Integer; AValue: TsHorAlignment);
|
procedure SetHorAlignment(ACol, ARow: Integer; AValue: TsHorAlignment);
|
||||||
procedure SetHorAlignments(ALeft, ATop, ARight, ABottom: Integer;
|
procedure SetHorAlignments(ALeft, ATop, ARight, ABottom: Integer;
|
||||||
@ -316,6 +318,9 @@ type
|
|||||||
{@@ This number of columns at the left is "frozen", i.e. it is not possible to
|
{@@ This number of columns at the left is "frozen", i.e. it is not possible to
|
||||||
scroll these columns }
|
scroll these columns }
|
||||||
property FrozenCols: Integer read FFrozenCols write SetFrozenCols;
|
property FrozenCols: Integer read FFrozenCols write SetFrozenCols;
|
||||||
|
{@@ Color of the line separating the frozen cols/rows from the regular grid }
|
||||||
|
property FrozenPaneBorderColor: TColor read FFrozenPaneBorderColor
|
||||||
|
write SetFrozenPaneBorderColor default clBlack;
|
||||||
{@@ This number of rows at the top is "frozen", i.e. it is not possible to
|
{@@ This number of rows at the top is "frozen", i.e. it is not possible to
|
||||||
scroll these rows. }
|
scroll these rows. }
|
||||||
property FrozenRows: Integer read FFrozenRows write SetFrozenRows;
|
property FrozenRows: Integer read FFrozenRows write SetFrozenRows;
|
||||||
@ -573,6 +578,8 @@ type
|
|||||||
{@@ This number of columns at the left is "frozen", i.e. it is not possible to
|
{@@ This number of columns at the left is "frozen", i.e. it is not possible to
|
||||||
scroll these columns. }
|
scroll these columns. }
|
||||||
property FrozenCols;
|
property FrozenCols;
|
||||||
|
{@@ Color of the line separating the frozen cols/rows from the regular grid }
|
||||||
|
property FrozenPaneBorderColor;
|
||||||
{@@ This number of rows at the top is "frozen", i.e. it is not possible to
|
{@@ This number of rows at the top is "frozen", i.e. it is not possible to
|
||||||
scroll these rows. }
|
scroll these rows. }
|
||||||
property FrozenRows;
|
property FrozenRows;
|
||||||
@ -1242,6 +1249,7 @@ begin
|
|||||||
FHeaderCount := 1;
|
FHeaderCount := 1;
|
||||||
ColCount := DEFAULT_COL_COUNT + FHeaderCount;
|
ColCount := DEFAULT_COL_COUNT + FHeaderCount;
|
||||||
RowCount := DEFAULT_ROW_COUNT + FHeaderCount;
|
RowCount := DEFAULT_ROW_COUNT + FHeaderCount;
|
||||||
|
|
||||||
FDefRowHeight100 := inherited GetDefaultRowHeight;
|
FDefRowHeight100 := inherited GetDefaultRowHeight;
|
||||||
FDefColWidth100 := inherited DefaultColWidth;
|
FDefColWidth100 := inherited DefaultColWidth;
|
||||||
//FOldTopRow := -1;
|
//FOldTopRow := -1;
|
||||||
@ -1251,6 +1259,7 @@ begin
|
|||||||
FSelPen.Color := clBlack;
|
FSelPen.Color := clBlack;
|
||||||
FSelPen.JoinStyle := pjsMiter;
|
FSelPen.JoinStyle := pjsMiter;
|
||||||
FSelPen.OnChange := @SelPenChangeHandler;
|
FSelPen.OnChange := @SelPenChangeHandler;
|
||||||
|
FFrozenPaneBorderColor := clBlack;
|
||||||
FAutoExpand := [aeData, aeNavigation, aeDefault];
|
FAutoExpand := [aeData, aeNavigation, aeDefault];
|
||||||
FHyperlinkTimer := TTimer.Create(self);
|
FHyperlinkTimer := TTimer.Create(self);
|
||||||
FHyperlinkTimer.Interval := HYPERLINK_TIMER_INTERVAL;
|
FHyperlinkTimer.Interval := HYPERLINK_TIMER_INTERVAL;
|
||||||
@ -2521,7 +2530,7 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
|
|
||||||
Canvas.Pen.Style := psSolid;
|
Canvas.Pen.Style := psSolid;
|
||||||
Canvas.Pen.Color := clBlack;
|
Canvas.Pen.Color := FFrozenPaneBorderColor;
|
||||||
Canvas.Pen.Width := 1;
|
Canvas.Pen.Width := 1;
|
||||||
if IsHor then
|
if IsHor then
|
||||||
Canvas.Line(AStart, ACoord, AEnd, ACoord)
|
Canvas.Line(AStart, ACoord, AEnd, ACoord)
|
||||||
@ -6409,6 +6418,14 @@ begin
|
|||||||
Setup;
|
Setup;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TscustomWorksheetGrid.SetFrozenPaneBorderColor(AValue: TColor);
|
||||||
|
begin
|
||||||
|
if FFrozenPaneBorderColor = AValue then
|
||||||
|
exit;
|
||||||
|
FFrozenPaneBorderColor := AValue;
|
||||||
|
InvalidateGrid;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TsCustomWorksheetGrid.SetFrozenRows(AValue: Integer);
|
procedure TsCustomWorksheetGrid.SetFrozenRows(AValue: Integer);
|
||||||
begin
|
begin
|
||||||
FFrozenRows := AValue;
|
FFrozenRows := AValue;
|
||||||
|
Reference in New Issue
Block a user