[Lazarus] Anchoring buttons (or other graphical elements)

Mattias Gaertner nc-gaertnma at netcologne.de
Sun Feb 12 23:21:02 CET 2012


"Jürgen Hestermann" <juergen.hestermann at gmx.de> hat am 12. Februar 2012 um
12:16 geschrieben:

> I am trying to understand the logic of the anchors of graphic elements
> like buttons etc., especially the meaning of the margin values. Assume
> two buttons A and B:
>
> -----              -----
> |  A  |             |  B  |
> -----              -----
>
> With the object inspector I can align the top of button B to the top of
> button A. Then the top of B is always the top of A plus the (top) margin
> of B. The margin values of A are irrelevant for the relation between the
> two borders. The same applies to the bottom alignment.
>
> But if I now align the left border of B to the right border of A it
> behaves different: The left margin of B is no longer the only value that
> defines the position of B relativ to (the right of) A. The right margin
> of A is also considered. It seems that the maximum of both values is
> used for the distance. This is very confusing. Is that by design?


Maybe you want read the documentation:
http://wiki.lazarus.freepascal.org/Autosize_/_Layout#BorderSpacing

Mattias

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20120212/2c82ace3/attachment-0003.html>


More information about the Lazarus mailing list