mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 18:08:35 +02:00
LCL: fix TControlScrollBar needs update if owner's handle changes. Issue #40794 introduced in 4891f1f0e1
This commit is contained in:
parent
ac5f2c1c49
commit
be89c477d9
@ -180,6 +180,7 @@ type
|
|||||||
function AutoScrollEnabled: Boolean; virtual;
|
function AutoScrollEnabled: Boolean; virtual;
|
||||||
procedure CalculateAutoRanges; virtual;
|
procedure CalculateAutoRanges; virtual;
|
||||||
procedure CreateWnd; override;
|
procedure CreateWnd; override;
|
||||||
|
procedure DestroyWnd; override;
|
||||||
function GetClientScrollOffset: TPoint; override;
|
function GetClientScrollOffset: TPoint; override;
|
||||||
function GetLogicalClientRect: TRect; override;// logical size of client area
|
function GetLogicalClientRect: TRect; override;// logical size of client area
|
||||||
procedure DoOnResize; override;
|
procedure DoOnResize; override;
|
||||||
|
@ -142,6 +142,8 @@ begin
|
|||||||
DebugLn('[TCustomMemo.FinalizeWnd] END ',DbgSName(Self),' ',FLines.ClassName,' FLines.Count=',dbgs(FLines.Count));
|
DebugLn('[TCustomMemo.FinalizeWnd] END ',DbgSName(Self),' ',FLines.ClassName,' FLines.Count=',dbgs(FLines.Count));
|
||||||
{$endif}
|
{$endif}
|
||||||
end;
|
end;
|
||||||
|
if FHorzScrollBar <> nil then FHorzScrollBar.InvalidateScrollInfo;
|
||||||
|
if FVertScrollBar <> nil then FVertScrollBar.InvalidateScrollInfo;
|
||||||
inherited FinalizeWnd;
|
inherited FinalizeWnd;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -35,6 +35,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TScrollingWinControl.DestroyWnd;
|
||||||
|
begin
|
||||||
|
inherited DestroyWnd;
|
||||||
|
if FHorzScrollBar <> nil then FHorzScrollBar.InvalidateScrollInfo;
|
||||||
|
if FVertScrollBar <> nil then FVertScrollBar.InvalidateScrollInfo;
|
||||||
|
end;
|
||||||
|
|
||||||
function TScrollingWinControl.GetClientScrollOffset: TPoint;
|
function TScrollingWinControl.GetClientScrollOffset: TPoint;
|
||||||
begin
|
begin
|
||||||
if (HorzScrollBar <> nil) and (VertScrollBar <> nil) then
|
if (HorzScrollBar <> nil) and (VertScrollBar <> nil) then
|
||||||
@ -75,8 +82,7 @@ begin
|
|||||||
//debugln(['TScrollingWinControl.DoOnResize ',DbgSName(Self),' ',dbgs(BoundsRect),' ',dbgs(ClientRect),' ',dbgs(GetLogicalClientRect)]);
|
//debugln(['TScrollingWinControl.DoOnResize ',DbgSName(Self),' ',dbgs(BoundsRect),' ',dbgs(ClientRect),' ',dbgs(GetLogicalClientRect)]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TScrollingWinControl.GetPreferredSizeClientFrame(out aWidth,
|
procedure TScrollingWinControl.GetPreferredSizeClientFrame(out aWidth, aHeight: Integer);
|
||||||
aHeight: integer);
|
|
||||||
// return frame width independent of scrollbars (i.e. as if scrollbars not shown)
|
// return frame width independent of scrollbars (i.e. as if scrollbars not shown)
|
||||||
begin
|
begin
|
||||||
if AutoScroll and (VertScrollBar<>nil) then
|
if AutoScroll and (VertScrollBar<>nil) then
|
||||||
|
Loading…
Reference in New Issue
Block a user