mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-08 12:39:18 +02:00
lcl: AutoSize control (if needed) on child visibility change and on child remove (issue #0010605)
git-svn-id: trunk@14819 -
This commit is contained in:
parent
4b5895c501
commit
47a961ba28
@ -3246,6 +3246,12 @@ begin
|
||||
AsWincontrol := TWinControl(Self)
|
||||
else
|
||||
AsWincontrol := nil;
|
||||
// resize parent if it has autosize
|
||||
if (Parent <> nil) and Parent.AutoSize then
|
||||
begin
|
||||
Parent.InvalidatePreferredSize;
|
||||
Parent.AdjustSize;
|
||||
end;
|
||||
if FVisible then
|
||||
begin
|
||||
if AsWincontrol <> nil then
|
||||
|
@ -5642,8 +5642,15 @@ begin
|
||||
AControl.InvalidateControl(AControl.IsVisible, False, True);
|
||||
Remove(AControl);
|
||||
if not (csDestroying in ComponentState) then
|
||||
begin
|
||||
if AutoSize then
|
||||
begin
|
||||
InvalidatePreferredSize;
|
||||
AdjustSize;
|
||||
end;
|
||||
Realign;
|
||||
end;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
TWinControl AlignControl
|
||||
|
Loading…
Reference in New Issue
Block a user