fixed update on changing package usage options

git-svn-id: trunk@2623 -
This commit is contained in:
mattias 2002-08-17 23:41:32 +00:00
parent 8ff3294cc0
commit 2978211924

View File

@ -138,13 +138,15 @@ var
and (CurBaseBounds.Bottom=CurBaseBounds.Top) then and (CurBaseBounds.Bottom=CurBaseBounds.Top) then
CurBaseBounds:=BoundsRect; CurBaseBounds:=BoundsRect;
{if csDesigning in ComponentState then {$IFDEF CHECK_POSITION}
//if csDesigning in ComponentState then
writeln('[TWinControl.AlignControls.DoPosition] Before Anchoring ', writeln('[TWinControl.AlignControls.DoPosition] Before Anchoring ',
' ',Name,':',ClassName, ' ',Name,':',ClassName,
' CurBaseBounds=',CurBaseBounds.Left,',',CurBaseBounds.Top,',',CurBaseBounds.Right-CurBaseBounds.Left,',',CurBaseBounds.Bottom-CurBaseBounds.Top, ' CurBaseBounds=',CurBaseBounds.Left,',',CurBaseBounds.Top,',',CurBaseBounds.Right-CurBaseBounds.Left,',',CurBaseBounds.Bottom-CurBaseBounds.Top,
' ParBaseClient=',ParentBaseClientSize.X,',',ParentBaseClientSize.Y, ' ParBaseClient=',ParentBaseClientSize.X,',',ParentBaseClientSize.Y,
' ParClient=',Parent.ClientWidth,',',Parent.ClientHeight, ' ParClient=',Parent.ClientWidth,',',Parent.ClientHeight,
'');} '');
{$ENDIF}
if akLeft in Anchors then begin if akLeft in Anchors then begin
// keep distance to left side of parent // keep distance to left side of parent
@ -209,7 +211,8 @@ var
end; end;
end; end;
{if csDesigning in ComponentState then {$IFDEF CHECK_POSITION}
//if csDesigning in ComponentState then
with Control do with Control do
writeln('[TWinControl.AlignControls.DoPosition] After Anchoring', writeln('[TWinControl.AlignControls.DoPosition] After Anchoring',
' ',Name,':',ClassName, ' ',Name,':',ClassName,
@ -217,7 +220,8 @@ var
' Control=',Name,':',ClassName, ' Control=',Name,':',ClassName,
' Old=',Left,',',Top,',',Width,',',Height, ' Old=',Left,',',Top,',',Width,',',Height,
' New=',NewLeft,',',NewTop,',',NewWidth,',',NewHeight, ' New=',NewLeft,',',NewTop,',',NewWidth,',',NewHeight,
'');} '');
{$ENDIF}
end; end;
// set min size // set min size
@ -257,13 +261,25 @@ var
end; end;
NewWidth:=Max(0,NewRight-NewLeft); NewWidth:=Max(0,NewRight-NewLeft);
NewHeight:=Max(0,NewBottom-NewTop); NewHeight:=Max(0,NewBottom-NewTop);
{$IFDEF CHECK_POSITION}
//if csDesigning in Control.ComponentState then
with Control do
writeln('[TWinControl.AlignControls.DoPosition] After Aligning',
' ',Name,':',ClassName,
' Align=',AlignNames[AAlign],
' Control=',Name,':',ClassName,
' Old=',Left,',',Top,',',Width,',',Height,
' New=',NewLeft,',',NewTop,',',NewWidth,',',NewHeight,
' ARect=',ARect.Left,',',ARect.Top,',',ARect.Right-ARect.Left,',',ARect.Bottom-ARect.Top,
'');
{$ENDIF}
end; end;
// set the new bounds // set the new bounds
if (Control.Left <> NewLeft) or (Control.Top <> NewTop) if (Control.Left <> NewLeft) or (Control.Top <> NewTop)
or (Control.Width <> NewWidth) or (Control.Height <> NewHeight) then begin or (Control.Width <> NewWidth) or (Control.Height <> NewHeight) then begin
{$IFDEF CHECK_POSITION} {$IFDEF CHECK_POSITION}
if csDesigning in Control.ComponentState then //if csDesigning in Control.ComponentState then
with Control do with Control do
writeln('[TWinControl.AlignControls.DoPosition] NEW BOUNDS Control=',Name,':',ClassName,' NewBounds=',NewLeft,',',NewTop,',',NewWidth,',',NewHeight,' Align=',AlignNames[AAlign]); writeln('[TWinControl.AlignControls.DoPosition] NEW BOUNDS Control=',Name,':',ClassName,' NewBounds=',NewLeft,',',NewTop,',',NewWidth,',',NewHeight,' Align=',AlignNames[AAlign]);
{$ENDIF} {$ENDIF}
@ -280,7 +296,7 @@ var
NewHeight:=Height; NewHeight:=Height;
end; end;
{$IFDEF CHECK_POSITION} {$IFDEF CHECK_POSITION}
if csDesigning in Control.ComponentState then //if csDesigning in Control.ComponentState then
with Control do with Control do
writeln('[TWinControl.AlignControls.DoPosition] AFTER SETBOUND Control=',Name,':',ClassName,' Bounds=',Left,',',Top,',',Width,',',Height); writeln('[TWinControl.AlignControls.DoPosition] AFTER SETBOUND Control=',Name,':',ClassName,' Bounds=',Left,',',Top,',',Width,',',Height);
{$ENDIF} {$ENDIF}
@ -2800,6 +2816,9 @@ end;
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.140 2003/06/19 22:38:21 mattias
fixed update on changing package usage options
Revision 1.139 2003/06/19 16:36:35 mattias Revision 1.139 2003/06/19 16:36:35 mattias
started codeexplorer started codeexplorer