mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 14:09:16 +02:00
* Fixed setting height of vertical scrollbar after loading when handle is not yet created
git-svn-id: trunk@17534 -
This commit is contained in:
parent
62a3b51538
commit
b9211d6127
@ -80,21 +80,24 @@ var
|
|||||||
OldWidth: Integer;
|
OldWidth: Integer;
|
||||||
OldHeight: Integer;
|
OldHeight: Integer;
|
||||||
begin
|
begin
|
||||||
if FKind <> Value then begin
|
if FKind = Value then Exit;
|
||||||
FKind := Value;
|
|
||||||
// switch width and height, but not when loading, because we assume that
|
FKind := Value;
|
||||||
// the lfm contains a consistent combination of kind and (width, height)
|
|
||||||
if not (csLoading in ComponentState) then begin
|
// the InterfaceConstraints need to get updated, even when loading
|
||||||
OldWidth:=Width;
|
OldWidth:=Width;
|
||||||
OldHeight:=Height;
|
OldHeight:=Height;
|
||||||
// TODO: Remove RecreateWnd
|
Constraints.UpdateInterfaceConstraints;
|
||||||
if HandleAllocated then
|
|
||||||
RecreateWnd(Self)
|
// switch width and height, but not when loading, because we assume that
|
||||||
else
|
// the lfm contains a consistent combination of kind and (width, height)
|
||||||
Constraints.UpdateInterfaceConstraints;
|
if csLoading in ComponentState then Exit;
|
||||||
SetBounds(Left,Top,OldHeight,OldWidth);
|
|
||||||
end;
|
// TODO: Remove RecreateWnd
|
||||||
end;
|
if HandleAllocated
|
||||||
|
then RecreateWnd(Self);
|
||||||
|
|
||||||
|
SetBounds(Left,Top,OldHeight,OldWidth);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomScrollBar.SetParams(APosition, AMin, AMax, APageSize: Integer);
|
procedure TCustomScrollBar.SetParams(APosition, AMin, AMax, APageSize: Integer);
|
||||||
|
Loading…
Reference in New Issue
Block a user