NiceGrid: Fix endless loop when colwidths are changed so that a horizontal scrollbar is about to disappear (https://forum.lazarus.freepascal.org/index.php?topic=64703).

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8924 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz 2023-09-23 17:56:55 +00:00
parent f13ba0a738
commit 46dba5245e

View File

@ -999,8 +999,10 @@ begin
FHorzOffset := Max(0, Min(FHorzOffset, FMaxHScroll));
FVertOffset := Max(0, Min(FVertOffset, FMaxVScroll));
SetScrollBar(SB_HORZ, FMaxHScroll, FHorzOffset, SIF_POS or SIF_RANGE);
SetScrollBar(SB_VERT, FMaxVScroll, FVertOffset, SIF_POS or SIF_RANGE);
if FHorzOffset <> 0 then
SetScrollBar(SB_HORZ, FMaxHScroll, FHorzOffset, SIF_POS or SIF_RANGE);
if FVertOffset <> 0 then
SetScrollBar(SB_VERT, FMaxVScroll, FVertOffset, SIF_POS or SIF_RANGE);
AllWidth := Min(ClientWidth, BodyWidth + FixedWidth);
if FShowFooter then