DockedFormEditor: Win32: Fixed wrong form size after changing AutoScroll, see issue #38856

git-svn-id: trunk@65093 -
This commit is contained in:
michl 2021-05-07 19:59:30 +00:00
parent 66493736c2
commit c8e8ad8dc8

View File

@ -10,13 +10,18 @@
} }
procedure TScrollingWinControl.SetAutoScroll(Value: Boolean); procedure TScrollingWinControl.SetAutoScroll(Value: Boolean);
var
LOldBounds: TRect;
begin begin
if FAutoScroll = Value then Exit; if FAutoScroll = Value then Exit;
FAutoScroll := Value; FAutoScroll := Value;
LOldBounds := BoundsRect;
if Value then if Value then
UpdateScrollBars UpdateScrollBars
else else
HideScrollbars; HideScrollbars;
if LOldBounds <> BoundsRect then
BoundsRect := LOldBounds;
end; end;
procedure TScrollingWinControl.CreateWnd; procedure TScrollingWinControl.CreateWnd;