LCL: call TDockManager.ResetBounds in TWinControl.AlignControls for Delphi compatibility

git-svn-id: trunk@24829 -
This commit is contained in:
mattias 2010-04-22 20:57:25 +00:00
parent b06278020c
commit c4c7983818
3 changed files with 9 additions and 10 deletions

View File

@ -9081,7 +9081,7 @@ Reads message from flag area, or stores a message
</element>
<!-- variable Visibility: private -->
<element name="TWinControl.FUseDockManager">
<short/>
<short>Create DockManager</short>
<descr/>
<seealso/>
</element>
@ -11170,6 +11170,7 @@ End;
<!-- property Visibility: public -->
<element name="TWinControl.DockSite">
<short>Is this a dock site? (read/write, default is False)</short>
<descr>Enable this to use the DockManager automatically. For example to call DockManager.ResetBounds when the control resizes.</descr>
</element>
<!-- property Visibility: public -->
<element name="TWinControl.DoubleBuffered">
@ -11300,7 +11301,8 @@ End;
</element>
<!-- property Visibility: public -->
<element name="TWinControl.UseDockManager">
<short>[!]Use an dock manager for control docking? (read/write)</short>
<short>Create DockManager for docking (read/write)</short>
<descr>The DockManager is created via a call to CreateDockManager.</descr>
</element>
<!-- property Visibility: public -->
<element name="TWinControl.VisibleDockClientCount">

View File

@ -1732,7 +1732,6 @@ type
function DoAlignChildControls(TheAlign: TAlign; AControl: TControl;
AControlList: TFPList; var ARect: TRect): Boolean; virtual;
procedure DoChildSizingChange(Sender: TObject); virtual;
procedure DoOnChangeBounds; override;
{$IFDEF OldAutoSize}
procedure ResizeDelayedAutoSizeChildren; virtual;
{$ENDIF}

View File

@ -3079,6 +3079,9 @@ begin
//DebugLn('[TWinControl.AlignControls] ',Name,':',Classname,' ',Left,',',Top,',',Width,',',Height,' AlignWork=',NeedAlignWork,' ControlCount=',ControlCount);
//if AControl<>nil then DebugLn(' AControl=',AControl.Name,':',AControl.ClassName);
//end;
// first let the DockManager align controls
if DockSite and UseDockManager and (DockManager<>nil) then
DockManager.ResetBounds(false);
if NeedAlignWork then
begin
AdjustClientRect(RemainingClientRect);
@ -3172,13 +3175,6 @@ begin
ReAlign;
end;
procedure TWinControl.DoOnChangeBounds;
begin
inherited DoOnChangeBounds;
if FUseDockManager and (DockManager<>nil) then
DockManager.ResetBounds(false);
end;
{$IFDEF OldAutoSize}
procedure TWinControl.ResizeDelayedAutoSizeChildren;
var
@ -8052,9 +8048,11 @@ begin
' -> NewBounds=',dbgs(NewBounds));
{$ENDIF}
{$IFDEF VerboseBug16184}
if (Parent=nil) and (Visible) then begin
DebugLn('[TWinControl.DoSendBoundsToInterface] A ',DbgSName(Self),
' OldRelBounds=',dbgs(FBoundsRealized),
' -> NewBounds=',dbgs(NewBounds));
end;
{$ENDIF}
FBoundsRealized:=NewBounds;
Include(FWinControlFlags,wcfBoundsRealized); // Note: set before calling widgetset, because used in WMSize