You've already forked lazarus-ccr
fpspreadsheet: TsWorksheetGrid - Fix text-overflown cells being erased when mouse leaves them.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3634 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -146,6 +146,7 @@ type
|
|||||||
procedure KeyDown(var Key : Word; Shift : TShiftState); override;
|
procedure KeyDown(var Key : Word; Shift : TShiftState); override;
|
||||||
procedure Loaded; override;
|
procedure Loaded; override;
|
||||||
procedure LoadFromWorksheet(AWorksheet: TsWorksheet);
|
procedure LoadFromWorksheet(AWorksheet: TsWorksheet);
|
||||||
|
procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
|
||||||
procedure MoveSelection; override;
|
procedure MoveSelection; override;
|
||||||
procedure SelectEditor; override;
|
procedure SelectEditor; override;
|
||||||
procedure SetEditText(ACol, ARow: Longint; const AValue: string); override;
|
procedure SetEditText(ACol, ARow: Longint; const AValue: string); override;
|
||||||
@ -3006,6 +3007,25 @@ begin
|
|||||||
);
|
);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{@@ ----------------------------------------------------------------------------
|
||||||
|
Standard mouse move handler. Is overridden because, if TextOverflow is active,
|
||||||
|
overflown cell may be erased when the mouse leaves them; repaints entire
|
||||||
|
grid instead.
|
||||||
|
-------------------------------------------------------------------------------}
|
||||||
|
procedure TsCustomWorksheetGrid.MouseMove(Shift: TShiftState; X, Y: Integer);
|
||||||
|
var
|
||||||
|
R: TRect;
|
||||||
|
tmp: Integer;
|
||||||
|
prevMouseCell: TPoint;
|
||||||
|
begin
|
||||||
|
prevMouseCell := GCache.MouseCell;
|
||||||
|
inherited;
|
||||||
|
if FTextOverflow and
|
||||||
|
((prevMouseCell.X <> GCache.MouseCell.X) or (prevMouseCell.Y <> GCache.MouseCell.Y))
|
||||||
|
then
|
||||||
|
InvalidateGrid;
|
||||||
|
end;
|
||||||
|
|
||||||
{@@ ----------------------------------------------------------------------------
|
{@@ ----------------------------------------------------------------------------
|
||||||
Standard method inherited from TCustomGrid.
|
Standard method inherited from TCustomGrid.
|
||||||
Repaints the grid after moving selection to avoid spurious rests of the
|
Repaints the grid after moving selection to avoid spurious rests of the
|
||||||
|
Reference in New Issue
Block a user