[Lazarus] Borderspacing property not working?

Timothy Groves the.tail.kinker at gmail.com
Fri Feb 12 20:19:01 CET 2021


That worked.  Thanks.

On Fri, 12 Feb 2021 at 14:06, Vojtěch Čihák via lazarus <
lazarus at lists.lazarus-ide.org> wrote:

> Try to add there AnchorParallel:
>
>
>
> labSurface [0].AnchorSide [akTop].Control := labSurfaceLocation;
>
> labSurface [0].AnchorSide [akTop].Side := asrBottom;
>
> labSurface [0].AnchorSide [akLeft].Control := Parent;
>
> labSurface [0].AnchorSide [akLeft].Side := asrRight;
>
> labSurface[0].AnchorParallel(akLeft, 0, labSurfaceLocation);
>
> for index := 1 to 8 do begin
>
> labSurface [index].AnchorSide [akTop].Control := labSurface [index - 1];
>
> labSurface [index].AnchorSide [akTop].Side := asrBottom;
>
> labSurface [index].AnchorSide [akLeft].Control := Parent;
>
> labSurface [index].AnchorSide [akLeft].Side := asrRight;
>
> labSurface [index].AnchorParallel(akLeft, 0, labSurfaceLocation);
>
> end;
>
>
>
> ______________________________________________________________
> > Od: "Timothy Groves via lazarus" <lazarus at lists.lazarus-ide.org>
> > Komu: "Lazarus mailing list" <lazarus at lists.lazarus.freepascal.org>
> > Datum: 12.02.2021 19:26
> > Předmět: [Lazarus] Borderspacing property not working?
> >
> 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?
> Here is a chunk of the offending code.
>   for index := 0 to 8 do begin
>     labSurface [index] := tLabel.Create (Application);
>     with (labSurface [index]) do begin
>       parent := tabSurface;
>       Caption := LocationNames [index];
>       BorderSpacing.Around := 8;
>       BorderSpacing.Left := 8;
>       Anchors := [akTop, akLeft];
>     end;
>   end;
>
>   labSurface [0].AnchorSide [akTop].Control := labSurfaceLocation;
>   labSurface [0].AnchorSide [akTop].Side := asrBottom;
>   labSurface [0].AnchorSide [akLeft].Control := Parent;
>   labSurface [0].AnchorSide [akLeft].Side := asrRight;
>   for index := 1 to 8 do begin
>     labSurface [index].AnchorSide [akTop].Control := labSurface [index -
> 1];
>     labSurface [index].AnchorSide [akTop].Side := asrBottom;
>     labSurface [index].AnchorSide [akLeft].Control := Parent;
>     labSurface [index].AnchorSide [akLeft].Side := asrRight;
>   end;
> --
> "Cows fly like clouds, but are never quite successful."
> --Megahal
>
>
> ----------
>
> --
> _______________________________________________
> lazarus mailing list
> lazarus at lists.lazarus-ide.org
> https://lists.lazarus-ide.org/listinfo/lazarus
> --
> _______________________________________________
> lazarus mailing list
> lazarus at lists.lazarus-ide.org
> https://lists.lazarus-ide.org/listinfo/lazarus
>


-- 
"Cows fly like clouds, but are never quite successful."
--Megahal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210212/d33af72c/attachment-0001.html>


More information about the lazarus mailing list