From 0a9b9940a95f48d03b580e8f6e67c182e1c72ab4 Mon Sep 17 00:00:00 2001 From: mattias Date: Sun, 4 Jan 2009 11:10:56 +0000 Subject: [PATCH] LCL: TControlScrollBar: ignore akBottom/akRight anchored controls git-svn-id: trunk@18101 - --- lcl/include/controlscrollbar.inc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lcl/include/controlscrollbar.inc b/lcl/include/controlscrollbar.inc index 5865464ac9..d65bc2d9de 100644 --- a/lcl/include/controlscrollbar.inc +++ b/lcl/include/controlscrollbar.inc @@ -245,13 +245,15 @@ procedure TControlScrollBar.AutoCalcRange; c: TControl; begin TmpRange := 0; - For I := 0 to FControl.ControlCount - 1 do begin + for I := 0 to FControl.ControlCount - 1 do + begin c:=FControl.Controls[I]; if not c.IsControlVisible then continue; if c.Align=alCustom then continue; if akBottom in c.Anchors then continue; if (c.Align<>alNone) and (akBottom in AnchorAlign[c.Align]) then continue; if (FControl.ChildSizing.Layout<>cclNone) and IsNonAligned(c) then continue; + if (akTop in c.Anchors) and (c.AnchorSide[akTop].Control <> nil) then continue; TmpRange := Max(TmpRange, c.Top + c.Height); end; Range := TmpRange; @@ -264,14 +266,15 @@ procedure TControlScrollBar.AutoCalcRange; c: TControl; begin TmpRange := 0; - for i := 0 to FControl.ControlCount - 1 do begin + for i := 0 to FControl.ControlCount - 1 do + begin c:=FControl.Controls[I]; if not c.IsControlVisible then continue; if c.Align=alCustom then continue; if akRight in c.Anchors then continue; if (c.Align<>alNone) and (akRight in AnchorAlign[c.Align]) then continue; - if (FControl.ChildSizing.Layout<>cclNone) - and IsNonAligned(c) then continue; + if (FControl.ChildSizing.Layout<>cclNone) and IsNonAligned(c) then continue; + if (akLeft in c.Anchors) and (c.AnchorSide[akLeft].Control <> nil) then continue; TmpRange := Max(TmpRange, c.Left + c.Width); end; Range := TmpRange;