lcl: when we calc autoscroll range don't skip child controls which left/top side control is parent control

git-svn-id: trunk@18109 -
This commit is contained in:
paul 2009-01-04 18:24:26 +00:00
parent eeff88b798
commit 98372de302

View File

@ -253,7 +253,10 @@ procedure TControlScrollBar.AutoCalcRange;
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;
if (akTop in c.Anchors) and
(c.AnchorSide[akTop].Control <> nil) and
(c.AnchorSide[akTop].Control <> c) then
continue;
TmpRange := Max(TmpRange, c.Top + c.Height);
end;
Range := TmpRange;
@ -274,7 +277,10 @@ procedure TControlScrollBar.AutoCalcRange;
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 (akLeft in c.Anchors) and (c.AnchorSide[akLeft].Control <> nil) then continue;
if (akLeft in c.Anchors) and
(c.AnchorSide[akLeft].Control <> nil) and
(c.AnchorSide[akLeft].Control <> c) then
continue;
TmpRange := Max(TmpRange, c.Left + c.Width);
end;
Range := TmpRange;