<div dir="ltr">Update:  Then I realized what had changed.  I attempted to clean up some of my other dynamically created page tabs, and problems persisted.  I ran some experiments, and determined the root problem.  So this problem is more properly expressed as:  When anchoring to Parent, border settings are ignored, regardless if they are set using a method (such as AnchorToNeighbour or AnchorParallel) or directly (by changing the BorderSpacing property).  Is this a known bug?  Or is it an undocumented feature?  If the latter, how do I anchor to a parent in a manner that respects border spacing?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 12 Feb 2021 at 14:19, Timothy Groves <<a href="mailto:the.tail.kinker@gmail.com">the.tail.kinker@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">That worked.  Thanks.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 12 Feb 2021 at 14:06, Vojtěch Čihák via lazarus <<a href="mailto:lazarus@lists.lazarus-ide.org" target="_blank">lazarus@lists.lazarus-ide.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p style="padding:0px;margin:0px">Try to add there AnchorParallel:</p>

<p style="padding:0px;margin:0px"> </p>

<p style="padding:0px;margin:0px">labSurface [0].AnchorSide [akTop].Control := labSurfaceLocation;</p>

<p style="padding:0px;margin:0px">labSurface [0].AnchorSide [akTop].Side := asrBottom;</p>

<p style="padding:0px;margin:0px">labSurface [0].AnchorSide [akLeft].Control := Parent;</p>

<p style="padding:0px;margin:0px">labSurface [0].AnchorSide [akLeft].Side := asrRight;</p>

<p style="padding:0px;margin:0px">labSurface[0].AnchorParallel(akLeft, 0, <span style="font-size:13.3333px">labSurfaceLocation</span>);</p>

<p style="padding:0px;margin:0px">for index := 1 to 8 do begin</p>

<p style="padding:0px;margin:0px">labSurface [index].AnchorSide [akTop].Control := labSurface [index - 1];</p>

<p style="padding:0px;margin:0px">labSurface [index].AnchorSide [akTop].Side := asrBottom;</p>

<p style="padding:0px;margin:0px">labSurface [index].AnchorSide [akLeft].Control := Parent;</p>

<p style="padding:0px;margin:0px">labSurface [index].AnchorSide [akLeft].Side := asrRight;</p>

<p style="padding:0px;margin:0px">labSurface [index].AnchorParallel(akLeft, 0, <span style="font-size:13.3333px">labSurfaceLocation</span>);</p>

<p style="padding:0px;margin:0px">end;                     </p>

<p style="padding:0px;margin:0px"> </p>

<p style="padding:0px;margin:0px">______________________________________________________________<br>
> Od: "Timothy Groves via lazarus" <<a href="mailto:lazarus@lists.lazarus-ide.org" target="_blank">lazarus@lists.lazarus-ide.org</a>><br>
> Komu: "Lazarus mailing list" <<a href="mailto:lazarus@lists.lazarus.freepascal.org" target="_blank">lazarus@lists.lazarus.freepascal.org</a>><br>
> Datum: 12.02.2021 19:26<br>
> Předmět: [Lazarus] Borderspacing property not working?<br>
></p>

<div dir="ltr">
<div>I have created several dynamic controls in my form, and setting the BorderSpacing property produces consistently incorrect results.  Dynamically created controls will exhibit borders between themselves, but not to the parent object.  What am I doing wrong?</div>
<div>Here is a chunk of the offending code.</div>
  for index := 0 to 8 do begin<br>
    labSurface [index] := tLabel.Create (Application);<br>
    with (labSurface [index]) do begin<br>
      parent := tabSurface;<br>
      Caption := LocationNames [index];<br>
      BorderSpacing.Around := 8;<br>
      BorderSpacing.Left := 8;<br>
      Anchors := [akTop, akLeft];<br>
    end;<br>
  end;<br>
<br>
  labSurface [0].AnchorSide [akTop].Control := labSurfaceLocation;<br>
  labSurface [0].AnchorSide [akTop].Side := asrBottom;<br>
  labSurface [0].AnchorSide [akLeft].Control := Parent;<br>
  labSurface [0].AnchorSide [akLeft].Side := asrRight;<br>
  for index := 1 to 8 do begin<br>
    labSurface [index].AnchorSide [akTop].Control := labSurface [index - 1];<br>
    labSurface [index].AnchorSide [akTop].Side := asrBottom;<br>
    labSurface [index].AnchorSide [akLeft].Control := Parent;<br>
    labSurface [index].AnchorSide [akLeft].Side := asrRight;<br>
  end;<br>
-- <br>

<div dir="ltr">"Cows fly like clouds, but are never quite successful." <br>
--Megahal</div>
</div>
<br>
 <br>
 ----------<br>
 <br>
 -- <br>
 _______________________________________________<br>
 lazarus mailing list<br>
 <a href="mailto:lazarus@lists.lazarus-ide.org" target="_blank">lazarus@lists.lazarus-ide.org</a><br>
 <a href="https://lists.lazarus-ide.org/listinfo/lazarus" target="_blank">https://lists.lazarus-ide.org/listinfo/lazarus</a><br>

-- <br>
_______________________________________________<br>
lazarus mailing list<br>
<a href="mailto:lazarus@lists.lazarus-ide.org" target="_blank">lazarus@lists.lazarus-ide.org</a><br>
<a href="https://lists.lazarus-ide.org/listinfo/lazarus" rel="noreferrer" target="_blank">https://lists.lazarus-ide.org/listinfo/lazarus</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr">"Cows fly like clouds, but are never quite successful." <br>--Megahal</div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">"Cows fly like clouds, but are never quite successful." <br>--Megahal</div>