LCL: TControl.SetAnchors: during disabled autosize: update basebounds when changing Anchors, bug #21730

git-svn-id: trunk@36882 -
This commit is contained in:
mattias 2012-04-17 08:59:52 +00:00
parent e5ffde0bbc
commit 3a53d3f869

View File

@ -3747,6 +3747,13 @@ begin
for a:=Low(TAnchorKind) to high(TAnchorKind) do
if (a in NewAnchors) and (AnchorSide[a].Side=asrCenter) then
AnchorSide[a].FixCenterAnchoring;
// Delphi Anchors depend on the current bounds of Self and Parent.ClientRect
// => fetch current BaseBounds
// for example:
// during disabled autosizing: Width:=100; Anchors:=Anchors+[akRight];
UpdateAnchorRules;
AdjustSize;
end;