mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-23 14:39:13 +02:00
LCL: TCustomGrid: fixed range check error when scrolling editor control
git-svn-id: trunk@44869 -
This commit is contained in:
parent
1417fc6edf
commit
5f56400fe5
@ -7614,13 +7614,20 @@ begin
|
||||
begin
|
||||
// editor is not in visible area, hide it complety
|
||||
// to avoid showing it in fixed cell area
|
||||
with msg.CellRect do
|
||||
Msg.CellRect := Rect(-Right, -Bottom, -Left, -Top);
|
||||
Msg.CellRect := Bounds(-FEditor.Width-10, -FEditor.Height-10, FEditor.Width,FEditor.Height);
|
||||
end;
|
||||
if FEditorOptions and EO_AUTOSIZE = EO_AUTOSIZE then begin
|
||||
if EditorBorderStyle = bsNone then
|
||||
InflateRect(Msg.CellRect, -1, -1);
|
||||
FEditor.BoundsRect := Msg.CellRect;
|
||||
// hide editor if out of visible area
|
||||
if (Msg.CellRect.Right>=0) and (Msg.CellRect.Bottom>=0)
|
||||
and (Msg.CellRect.Left<=ClientWidth) and (Msg.CellRect.Top<=ClientHeight)
|
||||
then begin
|
||||
FEditor.Visible := true;
|
||||
FEditor.BoundsRect := Msg.CellRect;
|
||||
end else begin
|
||||
FEditor.Visible := false;
|
||||
end;
|
||||
end else begin
|
||||
Msg.LclMsg.msg:=GM_SETBOUNDS;
|
||||
Msg.Grid:=Self;
|
||||
|
Loading…
Reference in New Issue
Block a user